Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) 1) Suppose x is 7 and y is 7. Choose the value of the following expression: (

ID: 3765695 • Letter: 1

Question

1)

1) Suppose x is 7 and y is 7. Choose the value of the following expression:
(x == 7) && !(x <= y)

false

true

1

null

2)What is the output of the following code?


char lastInitial = 'A';
switch (lastInitial)
{
case 'A':
cout << "section 1 ";
case 'B':
cout << "section 2 " <<endl;
break;
case 'C':
cout << "section 3 " <<endl;
break;
case 'D':
cout << "section 4 " <<endl;
break;
default:
cout << "section 5 " <<endl;
}

3)In the following code, what values could be read into number to terminate the while loop?


cout<<"Enter a number: ";
int number;
cin>>number;

while (number < 100 || number > 500)
{
cout<<"Enter another number: ";
cin>>number;
}


int x = 11;
do
{
x += 20;
} while (x > 100);

5

1

0

4

5)

Numbers in the range 99 through 501

Numbers less than 100

Numbers greater than 500

Numbers in the range 100 through 500

4)How many times will the following do-while loop be executed?

false

true

1

null

Explanation / Answer

1. NULL

2.Section1

3.NUmbers in range 100 through 500

4. 1

5. 22 20

6. -8