C - Pointers - Discussion

You Are Here :: Home > C > Pointers - Discussion

 



Q.

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

A. 5 B. Compiler error
C. 7 D. Runtime error

Answer: Option B
Explaination:

p is a pointer to a "constant integer". But we tried to change the value of the "constant integer"



Discussion

Your Comments Goes here...
NameDiscussion