C - Control Flow Constructions Questions and Answers

Take Exam

Control Flow Constructions in C are fundamental to defining how a program executes statements based on conditions, loops, and decisions. This topic focuses on essential C programming questions and answers that help you master control statements like if-else, switch, for, while, and do-while loops. Whether you’re preparing for placement drives at TCS, Wipro, or Infosys, or aiming to crack technical rounds in coding interviews, these control flow MCQs will test your logical understanding and practical knowledge. Practice these C Control Flow Constructions questions with answers to improve your coding efficiency and logic-building skills.

C - Control Flow Constructions

Showing 10 of 62 questions

31.  When is default statement executed in swich-case construct ?

  • Whenever there is exactly one match
  • whenever break statement is omitted in all case statements.
  • Whenever there is no match with case labels.
  • options b and c.
Show Answer Report

32.  C is an example of 

  • object oriented language
  • structured programming language
  • object based language
  • component based language
Show Answer Report

33.  The syntax of if statement is 

  • If expression then program -statement
  • if (expression) program - statement
  • if (expression) then program-statement
  • if expression { program- satement}
Show Answer Report

34.  main ( )          {            int a = 2, b = 4, c =8, x =4;            if ( x == b ) x = a; else x = b;            if ( x ! = b ) c = c + b ; else c = c +a ;            printf ( "c = %d\n", c );           } What will be printed when the above code is executed ?

  • c = 4
  • c = 8
  • c = 10
  • c = 12
Show Answer Report

35.  main ( )             {                unsigned int x = -10; int y =  10 ;              if ( y <= x ) printf ("He is good \n");              if ( y = = ( x = -10) ) printf (" She is better/n"); if ( ( int ) x = = y) printf ("It is the best\n");          } What will be the output of above sample code ?

  • She is better
  • He is good It is the best
  • It is the best
  • He is good
Show Answer Report

36.  If (  3.14) printf (" The vaLue of exponent\"); else printf ("The value of PIE is used in conditional part\n"); What might bethe result ?

  • Float value can't be given in conditional part.
  • The value of PIE is used in conditional part.
  • The value of exponent.
  • None of the above.
Show Answer Report

37.  main ( )       {       int x ;     If ( x > 4 ) printf ( "Brindha");    else if ( x > 10 ) printf ( " Karthik");      else if ( x > 21) printf ( " Pradeep");             else printf (" Sandeep");       } What will be the value of x so that "Karthik" willbe printed?

  • from 10 ti 21
  • from 11 to 21
  • greater than 10
  • none.
Show Answer Report

38.  main ( )            {             i = 0; j = 0;            for ( j = 1; j <10; j++)          {i = i+1; }            } In the (generic) segment above, what will be the value of the variable i on completion ?

  • 1
  • 3
  • 9
  • 10
Show Answer Report

39.  main ( )          {          int x = 0;         for ( (x = 1; x < 4;  x++);         printf (" x =%d\n", x);         } What will be printed when the above sample is executed ?

  • x = 0
  • x = 1
  • x = 3
  • x = 4
Show Answer Report

40.  main ( )            {             int x = 0;             for (; ; )             {               if (x++ = 4) break ;              continue;              printf ("x=%d\n",x);         what will be printed when the above code is executed ?

  • x = 0
  • x = 1
  • x = 4
  • x = 5
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test