A

Admin • 833K Points
Coach

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

Code:
int main()
{
int a = 4;
int *p;
p=&a;
while(*p > 0)
{
printf("%d ", *p);
(*p)--;
}
return 0;
}
  • (A) 0 0 0 0
  • (B) 4 4 4 4
  • (C) 4 3 2 1
  • (D) Compiler error
  • Correct Answer - Option(C)
  • Views: 26
  • 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.