GATE CS 2019 · Question 62 · Programming and Data Structures · Numerical answer (NAT) · 2 marks · no negative marks
Consider the following C program:
#include <stdio.h> int main() float sum = 0.0, j = 1.0, i = 2.0; while (i/j > 0.0625) j = j + j; sum = sum + i/j; printf("%f ", sum); return 0;
The number of times the variable sum will be printed, when the above program is executed, is ______.
Answer
Answer 5
Answer from the official GATE CS 2019 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes