-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
const int n;
n = 12;
printf("n is %d", n);
return 0;
}
-
- Compilation Error
- n is 4
- Runtime Error
- Garbage value
- None of these
Correct Option: A
Since the constant variable has to be declared and defined at the same time, not doing it results in an error.