edited by
14,917 views

2 Answers

Best answer
36 votes
36 votes

Answer: (A)

  • At $i=0, j=0$
  • At $i=1, j=1$
  • At $i=2, j=3$
  • At $i=3, j=6$
  • At $i=4, j=10$
edited by
0 votes
0 votes
They crux of the problem is, static int count = 0; will get executed only once.

Now, for

i=0, j =0

i=1, j=1

i=2, j=3

i=3, j=6,

i=4, j=10.

 

j=10, is the required answer to the given problem
Answer:

Related questions

52 votes
52 votes
3 answers
2
Kathleen asked Sep 14, 2014
11,743 views
The most appropriate matching for the following pairs$$\begin{array}{|ll|ll|}\hline X: & \text{m = malloc(5); m = NULL;} & 1: & \text{using dangling pointers} \\\hline Y...
42 votes
42 votes
9 answers
4
Kathleen asked Sep 14, 2014
22,568 views
Aliasing in the context of programming languages refers tomultiple variables having the same memory locationmultiple variables having the same valuemultiple variables hav...