C - Control Flow Constructions Questions and Answers

Practice Mode
Showing 10 of 62 questions
Q21
 What is tthe value of x in the expression x = (a = 10, a*a) ?
  • A invalid expression
  • B 0
  • C 10
  • D 100
Answer: Option D
Q22
 Comma is used as 
  • A a separator in C
  • B an operator in C
  • C a delimiter in C
  • D terminator in C
Answer: Option B
Q23
 What is the result of a multiple expression separated by commas ?
  • A result of the leftmost expression after evaluation
  • B result of the rightmost expression after evaluating all other previous expressions
  • C no value is returned
  • D result of arithmetic operations, if any
Answer: Option B
Q24
 Which is the correct statement ?
  • A while loop can be nested
  • B for loop can be nested
  • C options a and b
  • D one type of a loop cannot be nested in another type of loop
Answer: Option C
Q25
 The break statement is used to 
  • A continue the next iteration of a loop construct
  • B exit the block where it exists and continues further sequentially
  • C exit the outermost block even if it occurs inside the innermost block and continues further sequentially
  • D terminate the program
Answer: Option B
Q26
 The continue statement is used to 
  • A continue the next iteration of a loop construct
  • B exit the block where it exists and continues further
  • C exit the outermost block even if it occurs inside the innermost
  • D Continue the compliation even an error occurs in a program
Answer: Option A
Q27
 The continue statement is used in 
  • A selective control structures only
  • B loop control structures only
  • C options a and b
  • D goto control structure only
Answer: Option B
Q28
 The break statement is used in 
  • A Selective control structures only
  • B loop control structures only
  • C options a and b
  • D Switch-case control structures only
Answer: Option C
Q29
 If break statement is omitted in each case statement 
  • A The program executes the statements following the case statement where a match is found and exits the switch-case construct.
  • B The program executes the statements following the case statement where a match is found and also all the subsequent case statements and default statements.
  • C The program executes default statement only and continues with the remaining code.
  • D Syntax error is produced
Answer: Option B
Q30
 If default statement is omitted and there is no match with case labels
  • A No statement within switch-case will be executed.
  • B Syntax error is produced.
  • C Executes all the statements in the switch-case construct.
  • D Executes the last case statement only.
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test