Skip to content
Official PYQ · 2006

GATE CS 2006 Q15 — Asymptotic Worst Case Time and Space Complexity

Explain with AI

Consider the following C-program fragment in which ii, jj and nn are integer variables. 

 for( i = n, j = 0; i > 0; i /= 2, j +=i );

Let val(j)val(j) denote the value stored in the variable jj after termination of the for loop. Which one of the following is true? 

Choose one option
View answer

Answer: C

Worked explanation not available yet.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Asymptotic Worst Case Time and Space Complexity questions