Consider the following C program:
The number of times the variable sum will be printed, when the above program is executed, is ________.
c
Programming in CData Types, Syntax, Control Structures, LoopsNAT2 marksMedium
1#include <stdio.h>
2int main ( ) {
3 float sum = 0.0, j = 1.0, i = 2.0;
4 while (i / j > 0.0625) {
5 j = j + j;
6 sum = sum + i / j;
7 printf("%f\n", sum);
8 }
9 return 0;
10}
11A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.