-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
register const int p = 16;
p = 17;
printf("%d\n", p);
}
-
- Compilation Error
- 17
- 16
- Garbage value
- None of these
Correct Option: A
Compilation Error
main.c: In function ‘main’:
main.c:5:11: error: assignment of read-only variable ‘p’
p = 17;