1,390 views

1 Answer

Best answer
0 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
Position:
Show:

Related questions

0 0 votes
0 0 answers
1.7k
1.7k views
sushmita asked Dec 3, 2017
1,738 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 0 votes
1 answers 1 answer
1.3k
1.3k views
stblue asked Oct 18, 2017
1,313 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, *...
1 1 vote
4 4 answers
1.6k
1.6k views
Naveen Kumar 3 asked Jun 6, 2017
1,579 views
Q. Consider the C program shown below#include <stdio.h>#define print (a) printf (“%d”, a)int a;void A (int p){ p+ = a; print (p);}void B(int *q){ ...
2 2 votes
1 1 answer
2.1k
2.1k views
dd asked Apr 29, 2017
2,121 views
Assume sizeof int as 4#include <stdio.h unsigned int L = (sizeof(unsigned int)) << 3; int foo(unsigned int m,unsigned int start,unsigned int length) { length = length > 1...