A

Admin • 828.03K Points
Coach

Q. What is the output of C Program with pointers?

Code:
int main()
{
int a=20;
int *p, *q;
p=&a;
q=p;
printf("%d ", a);
*p=30;
printf("%d ", a);
*q=40;
printf("%d ", a);
return 0;
}
  • (A) 20 0 0
  • (B) 20 20 20
  • (C) 20 30 40
  • (D) Compiler error
  • Correct Answer - Option(C)
  • Views: 11
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.