Comment on the following code below
#include
void main()
{
int x = 5;
if (true);
printf("hello");
}
Answer: B
No answer description available for this question.
Enter details here
Consider the following program fragment i=6720; j=4; while (i%j)==0 { i=i/j; j=j+1; } On termination j will have the value
Answer: C
No answer description available for this question.
Enter details here
In the context of "break" and "continue" statements in C, pick the best statement.
Answer: D
No answer description available for this question.
Enter details here
Which of the following statements are correct about the below program?
#include
int main()
{
int i = 10, j = 15;
if(i % 2 = j % 3)
printf("IndiaBIX\n");
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
How many times GeeksQuiz is printed
#include
int main()
{
int i = -5;
while (i <= 5)
{
if (i >= 0)
break;
else
{
i++;
continue;
}
printf("GeeksQuiz");
}
return 0;
}
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
int main()
{
int i = 1;
switch(i)
{
printf("Hello\n");
case 1:
printf("Hi\n");
break;
case 2:
printf("\nBye\n");
break;
}
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
When 1 is entered, The output of the code below is?
#include
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch, ch + 1)
{
case 1:
printf("1\n");
break;
case 2:
printf("2");
break;
}
}
Answer: B
No answer description available for this question.
Enter details here
Which of the following statements are correct about the below program?
#include
int main()
{
int i = 0;
i++;
if(i <= 5)
{
printf("IndiaBIX\n");
exit(0);
main();
}
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
Can we use a switch statement to switch on strings?
Answer: B
No answer description available for this question.
Enter details here
How many lines of output does the following C code produce?
#include
float i=2.0;
float j=1.0;
float sum = 0.0;
main()
{
while (i/j > 0.001)
{
j+=j;
sum=sum+(i/j);
printf("%fn", sum);
}
}
Answer: D
No answer description available for this question.
Enter details here