Sail E0 Webinar
Question

What will be output of following program?




#include<stdio.h>
#include<string.h>
int main()
{
int register a;
scanf("%d",&a); // say a = 10
printf("%d",a);
return 0;
}


Options:
A .  10
B .  Address
C .  0
D .  Compilation error
E .  None of the above
Answer: Option D

Register data type stores in CPU. So it has not any memory address. Hence we cannot write &a.




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers