Computer Sciences > Gate 2019 > C Programming
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;
        printf("%f ", sum);
    };
    return 0;
}

The number of times variable sum will be printed When the above program is executed is _________ .

Correct : a

Similar Questions

Consider the following two functions void fun1(int n){ &nbsp; &nbsp; if(n == 0) return; &nbsp; &nbsp; &nbsp; printf(β€œ%d”, n); &nbsp; &nbsp; fun2(n-2); &...
#175 MCQ
Consider the C functions foo and bar given below: int foo(int val) { &nbsp; &nbsp; int x = 0; &nbsp; &nbsp; while (val > 0) &nbsp; &nbsp; { &nbsp; &nbsp; &nbs...
#190 MCQ
What is printed by the following ANSI C program? #include&lt;stdio.h&gt; int main(int argc, char *argv[]) { &nbsp; &nbsp; int a[3][3][3] = &nbsp; &nbsp; {{...
#311 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......