Nested Statement

Nested Statement

University

10 Qs

quiz-placeholder

Similar activities

C++ 1st ONLINE QUIZ

C++ 1st ONLINE QUIZ

University

13 Qs

Vòng lặp for

Vòng lặp for

7th Grade - University

10 Qs

Excel IF and Nested IF Functions Quiz

Excel IF and Nested IF Functions Quiz

12th Grade - University

10 Qs

C++ Chapter 5

C++ Chapter 5

University

6 Qs

Arrays and Functions

Arrays and Functions

University

12 Qs

C++ Puntatori

C++ Puntatori

University

9 Qs

Quiz 2: C++ Basics

Quiz 2: C++ Basics

University

11 Qs

C++ Array Quick Review

C++ Array Quick Review

University

10 Qs

Nested Statement

Nested Statement

Assessment

Quiz

Computers

University

Easy

Created by

AZLINA MYDIN

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C++ can we use multiple if statements in nested if statement.

No

Yes

Only Once

Only Singgle

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In nested if statement which statement evaluated first ?

Inner

Outer

Nested

Closer

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C++ how many levels of nested if statement is allowed!

Two

Four

Eight

Multiple

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Nested if statement with compound statements use the following parenthesis.

{ }

( )

[ ]

!!

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

WHICH TYPE OF DECISION STRUCTURE IS THIS?
if (x==10)
{
          if (y==20)
          {
                    cout<<"Coordinates: 10, 20";
          }
}

Switch
If Else if 
If else (binary choice)
Nested If

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the output for the program segment below if the x value is 25?
if (x>=10)
{
          if (y<=20)
          {
                    cout<<"The number is below 20";
          }

else

{
                    cout<<"The number is above 20";
          }
}

else

cout<< "Number is below 10";

Number is below 10

The number is below 20

The number is above 20

error

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the output for the program segment below if the x value is 8?
if (x>=10)
{
          if (y<=20)
          {
                    cout<<"The number is below 20";
          }

else

{
                    cout<<"The number is above 20";
          }
}

else

cout<< "Number is below 10";

Number is below 10

The number is below 20

The number is above 20

error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?