Nested Statement

Nested Statement

University

10 Qs

quiz-placeholder

Similar activities

FOP - CHAPTER 3

FOP - CHAPTER 3

University

10 Qs

C++ estructuras de control

C++ estructuras de control

University

9 Qs

CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 Qs

C++ Puntatori

C++ Puntatori

University

9 Qs

Loops-2

Loops-2

University

15 Qs

C++ misc-1

C++ misc-1

University

15 Qs

training ep.2

training ep.2

University

11 Qs

Estructura de Control Selectiva

Estructura de Control Selectiva

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?