A

Admin • 828.03K Points
Coach

Q. Determine output

Code:
void main()
{
int const *p=5;
printf("%d", ++(*p));
}
  • (A) 6
  • (B) 5
  • (C) Garbage value
  • (D) Compile error
  • Correct Answer - Option(D)
  • Views: 18
  • Filed under category C Programming
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.