A

Admin • 833K Points
Coach

Q. What does the following program print?

Code:
#include
void f(int *p, int *q)
{
p = q;
*p = 2;
}
int i = 0, j = 1;
int main()
{
f(&i, &j);
printf("%d %d n", i, j);
getchar();
return 0;
}
  • (A) 2 2
  • (B) 2 1
  • (C) 0 1
  • (D) 0 2
  • Correct Answer - Option(D)
  • Views: 23
  • 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.