Interview Question 3519

Created by admin on Sat, 17/11/2012 - 11:39
Explanation: 
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
Question: 

void main()
{
int const * p=5; printf("%d",++(*p));
}

Language: 
Answer: 

Compiler error: Cannot modify a constant value.