adplus-dvertising

Welcome to the Control Flow Statements in C MCQs Page

Dive deep into the fascinating world of Control Flow Statements in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Control Flow Statements in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Control Flow Statements in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Control Flow Statements in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Control Flow Statements in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Control Flow Statements in C MCQs | Page 11 of 32

Q101.
What will be the output of the given program?
#include<stdio.h>
void main()
{
      int  i=10;
      printf("i=%d", i);
      {
            int  i=20;
	    printf("i=%d", i);
	    i++;
	    printf("i=%d", i);
      }
      printf("i=%d", i);
}
Discuss
Answer: (c).10 20 21 10
Q102.
What will be the value of i and j after execution of following program?
#include<stdio.h>
void main()
{
	int i, j;
	for(i=0,j=0;i<10,j<20;i++,j++){
		printf("i=%d %t j=%d", i, j);
       }
}
Discuss
Answer: (c).20 20
Q103.
What will be the output given program?
#include<stdio.h>
void main()
{
	int i = -10;
	for(;i;printf("%d ", i++));
}
Discuss
Answer: (a).-10 to -1
Q104.
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++);
}
Discuss
Answer: (c).6 6
Q105.
What will be the output of the given program?
#include<stdio.h>
void main()
{
      int value=0;
      if(value)
            printf("well done ");
      printf("computerscience");
}
Discuss
Answer: (b).computerscience
Q106.
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);
}
Discuss
Answer: (d).100 0 100
Q107.
What will be the output of the given program?
#include
void main()
{
	float num=5.6;
	switch(num){
		case 5:printf("5");
		case 6:printf("6");
		default : printf("0");
			break;

	}
	printf("%d", num);
}
Discuss
Answer: (d).Complier error
Q108.
What will be the output of given program?
#include<stdio.h>
void main()
{
	int a=1;
	if("%d=hello", a);
}
Discuss
Answer: (b).no error no output
Q109.
What will be the output of given program?
#include<stdio.h>
void main()
{
	int a=3;
	for(;a;printf("%d ", a--);
}
Discuss
Answer: (c).3 2 1
Q110.
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);
}
Discuss
Answer: (a).1 -1 1

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!