Open In App

ISRO | ISRO CS 2016 | Question 23

Consider the following segment of C-code:

int j, n;
j = 1;
while (j 

The number of comparisons made in the execution of the loop for any n > 0 is:
(A) |_ log 2n _| * n
(B) n
(C) |_ log2n _|
(D) |_ log2n _| + 1

Answer: (D)
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :