+1 vote
56 views
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$?

| 56 views

i am getting this

by Boss (34.9k points)
edited
0

@abhishekmehta4u

yes, can u tell from where r u reading call by name, call by need such one (I mean which generally not comes)

Can u tell me call by name directly copies name from main or from global variable?

0

@abhishekmehta4u

1