Loop Questions and Answers
Practice ModeShowing 10 of 98 questions
Q31
State the correct statement.
Answer: Option D
Q32
Find the output
void main ( )
{
int i=32767u, x=49;
while (i>3)
{
printf("%c', x);
i++;
}
}
Answer: Option A
Q33
Find the output
void main ( )
{
int x=5;
for (;x<=5; if (x==5))
printf("%d', ++x);
}
Answer: Option C
Q34
Find the output.
void main ( )
{
int signed i=1;
do
{
printf ("%d", i);
}
while (i--);
}
Answer: Option C
Q35
Find the output.
void main ( )
{
int i=1;
while (i<=2)
{
printf("%d\i",i);
}
}
Answer: Option B
Q36
Find the output
void main ( )
{
while (!" ")
{
printf ("Helo");
}
}
Answer: Option C
Q37
Find the output.
void main ( )
{
int x=3;
float y=1;
while (x!=y)
{
x--;
y++;
if(x==y)
printf ("%d %d", x, y);
}
}
Answer: Option B
Q38
Find the output.
void main ( )
{
int i;
for (i=0;i++<=5;
printf ("5u", i);
}
Answer: Option B
Q39
Find the output
static int i;
void main ( )
{
for (; ~i ; i--)
printf ("%d', i);
}
Answer: Option B
Q40
Fint the output.
void main ( )
unsigned int i=5;
while (i-->=0)
printf ("5d", i);
}
Answer: Option C