in Programming edited by
70 views
0 votes
0 votes

The value of p after execution of the following program will be:

int new(int t)
{
static int cal=0;
cal=cal+t;
return(cal);
}
main()
{
int t,p;
for(t=0;t<=4;t++)
p= new(t);
}
  1. $10$
  2. $4$     
  3. $6$    
  4. $7$
in Programming edited by
by
70 views

1 Answer

1 vote
1 vote
Best answer

and p = new(t)

at the end of the execution

p = new(4)

p = 10 answer

selected by
Answer:

Related questions