Discussion Forum : C Miscellaneous
Question - Determine output:
void main()
{
int const *p=5;
printf("%d", ++(*p));
}
Options:
A .  6
B .  5
C .  Garbage Value
D .  Compiler Error
Answer: Option D
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".

Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *