-
What will be the output of the following C code?
#include <stdio.h>
void fun(const int *);
int main()
{
const int k = 12;
printf("%d ", k);
fun(&k);
printf("%d", k);
}
void fun(const int *k)
{
*k = 21;
}
-
- 12 21
- 21 12
- Runtime Error
- Compilation Error
- None of these
Correct Option: D
Cannot change a const type value.