C Objective Interview Questions – Control Statements

These C Objective Interview Questions post providing basic, intermediate and Hard level examples in C Control Statements. The Practice of these examples makes you good in C programming.


Which of the following is evaluated first in case of the loop?

  1. the looping condition
  2. statements of body
  3. modify-statement
  4. Initialization statement.

Answer :

Ans : 4; for(initialization ; condition ; modify)

Modify statement executes inside the for loop after

  1. initialization statement
  2. condition
  3. body
  4. none of the above.

Answer :

Ans : 3; 

Which of the following statements is correct about the if-else statement?

  1. nested if-else statements are not allowed
  2. else block is mandatory with every if block
  3. if-block is compulsory with every else block
  4. None of the above

Answer :

Ans : 3; We cannot define else-block without if-block

What happens when the loop condition is no longer satisfied?

  1. abnormal termination of the program
  2. Control comes out of the loop and continues with remaining statements execution.
  3. infinite iteration of the loop
  4. initialization expression will be evaluated again.

Answer :

Ans : 3;

Which of the following statements is correct?

  1. We can use “strings” as switch cases
  2. “break” is mandatory along with “switch”
  3. We can use “continue” inside switch
  4. None of the above.

Answer :

Ans : 2; We must place break statement after every case inside switch

Which of the following statements is correct in case of for loop?

  1. Initialization statement is Mandatory
  2. Condition statement is mandatory
  3. Body executes after execution of modifying statement
  4. Initialization statement executes only once.

Answer :

Ans : 4; 

Which of the following do we use as a condition in while loop?

  1. Constant
  2. Variable
  3. Expression
  4. Method call
  5. All of the above.

Answer :

Ans : 5; 

Which of the following statements is correct?

  1. The inner if statement executes only when outer if statement is true.
  2. We can define only one if-statement inside another if-statement
  3. We can’t use if-else-if ladder inside the else block.
  4. None of the above.

Answer :

Ans : 1; 

 


Which of the following statements is correct?

  1. If we omit initialization statement in for loop, no need to place semicolon followed by initialization
  2. A while loop must end with semicolon
  3. The do-while loop does not execute if the condition has failed
  4. None of the above.

Answer :

Ans : 4; All are incorrect statements

C Technical Interview Questions – Functions

Share this