-
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int n = 21;
int *const m = &n;
int s = 12;
m = &s;
printf("%d", m);
}
-
- 21
- Compilation Error
- 12
- Runtime Error
- None of these
Correct Option: B
Since the pointer m is declared to be constant, trying to assign it with a new value results in an error.