A

Admin • 833K Points
Coach

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

Code:
void texas(int *,int *);
int main()
{
int a=11, b=22;
printf("Before=%d %d, ", a, b);
texas(&a, &b);
printf("After=%d %d", a, b);

return 0;
}
void texas(int *i, int *j)
{
*i = 55;
*j = 65;
}
  • (A) Before=11 22, After=11 22
  • (B) Before=11 22, After=55 65
  • (C) Before=11 22, After=0 0
  • (D) Compiler error
  • Correct Answer - Option(B)
  • Views: 20
  • 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.