edited by
7,701 views

2 Answers

Best answer
12 votes
12 votes

i=6720, j=4


while ((6720) % 4 ==0)

i = 6720/4 = 1680

j= 4 + 1 = 5


while ( (1680 ) % 5 ==0)

i= 1680 / 5 =336

j = 5 + 1 = 6


while ( (336) %6 ==0)

i= 336 / 6 =56

j = 6+1 = 7


while ((56 %7) ==0)

i = 56/7 = 8

j= 7+1=8


while((8%8==0)

i= 8/8 = 1

j = 8+1 = 9


while ( 1 % 9 ==0)  // false

Ans - j = 9

selected by
7 votes
7 votes

6720/4 = 1680 ===> j=5

1680/5 = 336 ===> j=6

336/6 = 56 ===> j=7

56/7 = 8 ===> j=8

8/8 = 1 ===> j=9

Hence final value of j = 9

Answer:

Related questions

9 votes
9 votes
5 answers
1
go_editor asked Jun 21, 2016
6,186 views
The for loopfor (i=0; i<10; ++i) printf("%d", i&1);prints0101010101011111111100000000001111111111
10 votes
10 votes
4 answers
2
go_editor asked Jun 21, 2016
9,469 views
The output of the following program ismain() { static int x[] = {1,2,3,4,5,6,7,8} int i; for (i=2; i<6; ++i) x[x[i]]=x[i]; for (i=0; i<8; ++i) printf("%d", x[i]); }1 2 3 ...
7 votes
7 votes
3 answers
3
go_editor asked Jun 21, 2016
6,680 views
The following programmain() { inc(); inc(); inc(); } inc() { static int x; printf("%d", ++x); }prints 012prints 123prints 3 consecutive, but unpredictable numbersprints 1...
13 votes
13 votes
8 answers
4
milankamilya asked Jun 14, 2016
8,564 views
If n has 3, then the statement a[++n]=n++;assigns 3 to a[5]assigns 4 to a[5]assigns 4 to a[4]what is assigned is compiler dependent