MCQs on Control Structure in C

Hello students welcome to CSE Study247 , Today I am provide MCQs on Control Structure in C.

This page provide 20 Multiple choice question with Answer that is very useful of Computer science students like preparation of many exam Like ( ISRO,DRDO ,Semester, Interview, TCS , Railway & another Government Sector)

❤️ TOP 500+ C Programming Question and Answer

C programming is the basic language of programming that help to learn another language. So this MCQ is very useful for you.

C-Programming-MCQ-Multiple-Choice-Questions

C is a general purpose ,high level language that originally developed by Dennis Ritchie to develop the UNIX operating system at Bell labs.

 

Q.1 Find out the output for the following program

  void main()
  {
  int x=22;
  if(x=10)
  printf(“True”);
  else
  printf(“False”);
  }






ANSWER= (A) True

 

Q.2 Find out the output for the following program

  void main()
  {
  if((-10 && 12 ) || (19 && 21))
  printf(“%s”,”True”);
  else
  printf(“%s”,”False”);
  }






ANSWER= (A) True

 

Q.3 Choose a syntax for C Ternary Operator from the list





ANSWER= (C) condition ? expression1 : expression2

 

Q.4 Choose a syntax for C Ternary Operator from the list





ANSWER= (C) condition ? expression1 : expression2

 

Q.5 Which of the following can replace a simple if-else construct?





ANSWER= (A) Ternary operator

 

Q.6 Which statement is required to execute a block of code when the condition is false?





ANSWER= (C) else

 

Q.7 The if-elseif-else statement in C programming is used





ANSWER= (B) Create multiple conditional statements

 

Q.8 Multiple values of the same variable can be tested using





ANSWER= (C) switch

 

Q.9 The continue statement cannot be used with





ANSWER= (C) switch

 

Q.10 Which keyword can be used for coming out of recursion





ANSWER= (B) return

 

Q.11 The following code for(;;) represents an infinite loop , It can be terminated by





ANSWER= (A) break

 

Q.12 goto can be used to jump from main to within a function?





ANSWER= (B) FALSE

 

Q.13 Which of the following is an invalid if-else statement?





ANSWER= (A) if (if (a == 1)){}

 

Q.14 Switch statement accepts.





ANSWER= (D) All of these

 

Q.15 Find out the output for the following program

  void main()
  {
  int a=8;
  if(a=4)
  printf(“CSE Study247 is a good website for C MCQs”);
    else
printf(“CSE Study247 is a bad website for C MCQs”);
  }






ANSWER= (A) CSE Study247 is a good website for C MCQs

 

Q.16 A labeled statement consist of an identifier followed by





ANSWER= (C) :

 

Q.17 Find out the output for the following program

  void main()
  {
  int k = 0;
  for (b)
  printf(“CSE Study247”);
  }






ANSWER= (A) Compile time error

 

Q.18 Which of the following is used to control the flow of execution in a program ?





ANSWER= (D) Control structure

 

Q.19 How many types of control statement are used in c ?





ANSWER= (C) 4

 

Q.20 Which of the following is used to for making one way decision ?





ANSWER= (A) if

1. Official Telegram Click Here
2. Telegram For CSE MCQs Click Here
3. You TubeClick Here
error: Content is protected !!