-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
register int n = 110;
int *ptr = &n;
*ptr = 111;
printf("%d %d\n", n, *ptr);
}
-
- 110 111
- 111 110
- 111
- 110
- Compilation Error
Correct Option: E
Compilation Error
main.c: In function ‘main’:
main.c:5:9: error: address of register variable ‘n’ requested
int *ptr = &n;