A

Admin • 833.24K Points
Coach

Q. What is the output?

Code:
int a = 10;
int *p = &a;
printf("%d", *p);
  • (A) Address of a
  • (B) 10
  • (C) Garbage
  • (D) Compiler error
  • Correct Answer - Option(B)
  • Views: 24
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

*p dereferences the pointer to get value of a.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.