Science, asked by rashmitasingh11, 10 months ago

What will get displayed after the following program segment completes execution?
void f1 (int a, int b){
int c;
c=a; a=b; b=c;
}
void f2 (int *a, int *b){
int c;
c=*a; *a=*b; *b=c;
}
int main(){
int a=4, b=5, c=6;
f1(a, b);
f2(&b, &c);
printf ("%d", c-a-b);
}
a) -5
b) -4
c) 5
d) 3​

Answers

Answered by Cheeku1405
0

Answer:

Mam kindly post thi picture of the question

Answered by sandhyanathsharma
1

-5 is the answer

the F2 call swaps the valu of b and c , so that c becomes 5 and b becomes 6

5-4-6=-5

Similar questions