Nested Statement

Nested Statement

University

10 Qs

quiz-placeholder

Similar activities

Topic2: If method

Topic2: If method

University

10 Qs

Quiz 9: Pointer

Quiz 9: Pointer

University

12 Qs

Quiz 2

Quiz 2

University

11 Qs

CPP/C

CPP/C

University

10 Qs

Quiz 3

Quiz 3

University

10 Qs

Quiz 5: Loops

Quiz 5: Loops

University

10 Qs

Seatwork 2

Seatwork 2

University

10 Qs

CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 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?