What will be the output of the following C code?
#include <stdio.h>
int main()
{
register int i = 10;
int *p = &i;
*p = 11;
printf("%d %d\n", i, *p);
}
#include <stdio.h>
int main()
{
register int i = 10;
int *p = &i;
*p = 11;
printf("%d %d\n", i, *p);
}
A. Depends on whether i is actually stored in machine register
B. 10 10
C. 11 11
D. Compile time error
Answer: Option D
Join The Discussion