C++ Flow Control

Last Updated :
Discuss
Comments

Question 1

What is the use of the else if statement in C++?

  • A

    It is used to create infinite loops

  • B

    It allows checking multiple conditions

  • C

    It closes a program

  • D

    It is an invalid syntax

Question 2

Which of the following is NOT a decision-making statement in C++?

  • A

    if

  • B

    switch

  • C

    struct

  • D

    else

Question 3

Which operator is used in the ternary conditional operator in C++?

  • A

    ?:

  • B

    ::

  • C

    &&

  • D

    ==

Question 4

What does the switch statement evaluate?

  • A

    A float expression

  • B

    A string expression

  • C

    An integral or enumeration expression

  • D

    A boolean expression

Tags:

There are 4 questions to complete.

Take a part in the ongoing discussion