Gate CS-2006 Question Paper With Solutions

Q. 7 Consider the following C-program fragment in which i, j,and n are integer variables.

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

Let Val (j) =denote the value stored in the variable j after termination of the for loop. Which one of the following is true? Gate CS-2006 Question Paper With Solutions Answer: (C)

Explanation: Gate CS-2006 Question Paper With Solutions

Learn More:   Gate CS-2001 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here