

MCQOPTIONS
Saved Bookmarks
1. |
Consider the following segment of C codeint j, n;j = 1;while (j<=n) j = j*2;The number of comparisons made in the execution of the loop for any n > 0 is |
A. | \(⌊log_2 n⌋^* n\) |
B. | \(n\) |
C. | \(⌊log_2 n⌋\) |
D. | \(⌊log_2 n⌋+1\) |
Answer» E. | |