Computer Sciences > Gate 2019 > C Programming
Consider the following C program:
The number of times variable sum will be printed When the above program is executed is _________ .
#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;
}
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){
if(n == 0) return;
printf(β%dβ, n);
fun2(n-2);
&...
Consider the C functions foo and bar given below:
int foo(int val)
{
int x = 0;
while (val > 0)
{
&nbs...
What is printed by the following ANSI C program?
#include<stdio.h>
int main(int argc, char *argv[])
{
int a[3][3][3] =
{{...
Total Unique Visitors
Loading......