retagged by
456 views
1 votes
1 votes
int   x = 5, y = 10 ;
void main ( ) 
{ 
int   i = 2, j = 3 
       A (i, j); 
} 
void A (int i, int j) 
{ 
      int x = 10, y = 5 ; 
      i = i + x :
      j = i + y : 
printf ("%d %d", i, j); 
     B (i, j); 
} 
void B (int i, int j) 
{ 
     i = j + y ; 
     j = i + x ; 
print f ("%d", i + j); 
} 

output printed by

1.call-by-reference

2. call-by-name

3. call-by-need

4. call-by-value

5.Static scoping

6.Dynamic scoping


Any reference for call by name and call by need

Is for static coping $12,17,54$ or $12,17,59$?

retagged by

1 Answer

2 votes
2 votes

i am getting this

edited by

Related questions

1 votes
1 votes
2 answers
2
3 votes
3 votes
2 answers
3
set2018 asked Oct 10, 2017
454 views
int i=10;main(){int i =5,k,i=6;printf("enter value");scanf("%d",&k);if(k>0){fun1();}else{fun2();}}void fun1();{printf("%d",i);}void fun2();{int i=5;printf("%d",i);fun1();...
3 votes
3 votes
1 answer
4
dragonball asked Jan 14, 2018
892 views
How to solve any dynamic scoping question . Plz describe in detail.