C Programming: Determine the output#include stdio.h> void i(int *a,int *b) a=b; *a=2; int x=0,y=1; int main() i(&x,&y); printf("percent dpercent dn",x,y); return 0;
A. 22
B. 21
C. 02
D. 01
Answer:C
C Programming: Determine the output#include stdio.h> void i(int *a,int *b) a=b; *a=2; int x=0,y=1; int main() i(&x,&y); printf("percent dpercent dn",x,y); return 0;
A. 22 B. 21 C. 02 D. 01
Explanation: It starts with main I and j, which are both globally initialised by 0 and 1. As a result, when we call function i(&x,&y), the addresses x and y are supplied. When a=b and *a=2 indicates *b=2, the value of *b is passed 2 and the value of *b is returned to y, as well as the values of x and y. As a result, printf("percent d'percent dn",x,y) produces an output (0,2)