Control Structures MCQs
Practice free Control Structures multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 155 questions — no login required.
Question 37hard
What will be the output of the given program?
#include<stdio.h>
void main()
{
int a=11,b=5;
if(a=5) b++;
printf("%d %d", ++a, b++);
}Question 38hard
What will be the output of the given program?
#include<stdio.h>
void main()
{
int value=0;
if(value)
printf("well done ");
printf("examveda");
}Question 39hard
What will be the output of the given program?
#include<stdio.h>
void main()
{
int value1, value2=100, num=100;
if(value1=value2%5) num=5;
printf("%d %d %d", num, value1, value2);
}Advertisement
Question 40hard
What will be the output of the given program?
#include<stdio.h>
void main()
{
float num=5.6;
switch(num){
case 5:printf("5");
case 6:printf("6");
default : printf("0");
break;
}
printf("%d", num);
}Question 41hard
What will be the output of given program?
#include<stdio.h>
void main()
{
int a=1;
if("%d=hello", a);
}Question 42hard
What will be the output of given program?
#include<stdio.h>
void main()
{
int a=3;
for(;a;printf("%d ", a--);
}Advertisement
Question 43hard
What will be the output of given program?
#include<stdio.h>
void main()
{
int i=1, j=-1;
if((printf("%d", i)) < (printf("%d", j)))
printf("%d", i);
else
printf("%d", j);
}Question 44hard
What will be the output of the following piece of code?
for(i = 0; i<10; i++);
printf("%d", i);Question 45hard
What will be the output of the following code?
#include<stdio.h>
void main()
{
int s=0;
while(s++<10)
{
if(s<4 && s<9)
continue;
printf("%dt", s);
}
}