Control Structure Questions and Answers
Practice ModeShowing 10 of 97 questions
Q61
Find the output
void main ( )
{
int a,b,c=4;
if (a=c%2)
b=5;
printf("%d", b);
}
Answer: Option D
Q62
Find the output
void main ( )
{
char a='A';
if ((a=='z') | | ((a='L') &&
(sizeof (a='\0'))))
a=a;
printf("%c", a);
printf("Nothing");
}
Answer: Option C
Q63
switch statement only tests for
Answer: Option C
Q64
Find the output.
voidmain ( )
{
int x=1;
if (x++>=x)
printf("%d",x);
else
printf("%d", ++x)
}
Answer: Option B
Q65
Find the output
void main ( )
{
int i, j;
for (i=1, j=5; i++, j--;)
{
if (i==j)
continue;
printf("%d", i);
}
}
Answer: Option A
Q66
Which is true about break statement?
Answer: Option C
Q67
Find the output
void main ( )
{
char c='\b';
if (c==8)
printf("true");
else
printf("false");
}
Answer: Option A
Q68
Find the output
void main ( )
{
char ch;
if("printf(")")
printf("ok");
else
printf("Bye");
}
Answer: Option A
Q69
Find the output
void main ( )
int x=1, y=3, z=0;
if (x!=y>=z)
printf("Right");
else
printf("Wrong");
}
Answer: Option B
Q70
Find the output
void main ( )
{
int a=4, b=8, c=3;
if (a+b!c)
printf("True");
else
printf("False");
}
Answer: Option C