Gate2000_2.20

 The value of j at the end of the execution of the following C program

int incr (int i)
{
static int count = 0;
count = count + i;
return (count);
}
main () {
int i,j;
for (i = 0; i <=4; i++)
j = incr(i);
}

 

is
(a) 10
(b) 4
(c) 6
(d) 7

Answer

Discuss

0Comment