-
What will be the output of the following C code?
#include <stdio.h>
void main()
{
{
int R = 81;
}
printf("%d", R);
}
-
- Undefined
- Compilation Error
- 81
- Garbage value
- None of these
Correct Option: B
Compilation Error
main.c: In function ‘main’:
main.c:7:22: error: ‘R’ undeclared (first use in this function)
printf("%d", R);
^
main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in