ExamVeda
Login
Home
This question belongs to C Program C Miscellaneous
C Miscellaneous
?

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

Answer & Solution
Correct Answer: Option D

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

Examveda
Question posted by Examveda
Community

Join the Discussion

2 Comments
Intresting Video's
Intresting Video's 7 years ago
int i=5;
int const *p=&i;
this is pointer to const or not
Ramu Chowdary
Ramu Chowdary 9 years ago
if there is only ++p what is the answer