544 views

1 Answer

Best answer
0 votes
0 votes

Yes , a=169 , b=169 is correct answer.

since static scoping is sssigned to variable b , so it will retain its value through out the program.

first of all the variable b is assigned a value of 12 , and just after that procedure N is called , and it made b= b+1 to value 13 , and since b is static so it will retain the value 13 throught the program. Just after this M(b) is called and the code a=a*a is called off , so 13*13= 169.

so the value of a will be 169 and b =169.

http://stackoverflow.com/questions/41215162/value-of-callee-and-caller-when-using-call-by-references

selected by

Related questions

0 votes
0 votes
0 answers
1
sushmita asked Dec 3, 2017
1,374 views
static char hello[]='hello'; printf("%s",hello);The output will be same as-puts("hello");puts(hello);printf("%s", "hello");puts("hello\n");Answer is 1,2 and 3.Can anyone ...
0 votes
0 votes
1 answer
2
stblue asked Oct 18, 2017
768 views
#include <stdio.h>int main(){ int a[] = {50, 60, 10, 30, 40, 20 }; int *b[] = {a+3, a+4, a, a+2, a+1, a+5 }; int c = b; c++; printf("%u, %u, %u\n", c-b, *...
2 votes
2 votes
1 answer
4