edited by
453 views
0 votes
0 votes

Which of the statements are false about keyword ‘register’?

  1. Register keyword can be used with a pointer variable as register can have address of memory location.
  2. We can use '&’ operator with register variable and access address of register.
  3. Register storage class can be used with static storage class

    A) only a  B) both a and c C) all of the above D) both b and c.

Can someone explain the choice a more clearly in the above question?

edited by

1 Answer

0 votes
0 votes
Register is small storage unit inside microprocessor so it can be used for calculation in c programming using keyword "register" e.g.,int register but trying to access the register address like we do in normal variables (eg.,&a that is in memory) will lead to unknown condition even lead to some complex issues or an fatal error

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
4
Mahbub Alam asked Nov 19, 2018
244 views
#include<stdio.h>void main(){ int i ;for(i=0; i<5; i++)f() ;}void f(){static int x ;x=5 ;x++ ;printf("%d", x);}OUTPUT OF THE FUNCTION IS(A)6,6,6,6,6(B)6,7,8,9,10(C)5,5,5,...