Exam 2: C++ Basics

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The stream that is used for output to the screen is called ___________.

(Short Answer)
4.9/5
(37)

Loops are used when we need our program to make a choice between two or more things.

(True/False)
4.8/5
(41)

The integer 0 is considered true.

(True/False)
4.7/5
(37)

Given the following code fragment and the input value of 2.0, what output is generated? Float tax; Float total; Cout << "enter the cost of the item\n"; Cin >> total; If total >= 3.0) { Tax = 0.10; Cout << total + total * tax) << endl; } Else { Cout << total << endl; }

(Multiple Choice)
4.8/5
(40)

Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat?

(Multiple Choice)
4.9/5
(36)

The braces for a loop define the ____________ of the loop.

(Short Answer)
4.8/5
(46)

Is << used for input or output? ____________

(Short Answer)
4.7/5
(35)

What is the correct conditional statement to determine if x is between 19 and 99? __________________

(Short Answer)
4.8/5
(40)

What is the value of x after the following statement? Float x; X = 3.0 / 4.0 + 3 + 2 / 5

(Multiple Choice)
4.9/5
(33)

What is the output of the following code? Float value; Value = 33.5; Cout << value << endl;

(Multiple Choice)
4.8/5
(42)

<< is called the stream ____________________ operator.

(Short Answer)
4.9/5
(40)

What is the value of x after the following statements? Int x; X = 15 %4;

(Multiple Choice)
4.9/5
(31)

The body of a do-while loop always executes at least once.

(True/False)
4.9/5
(34)

>> is known as the stream ____________ operator.

(Short Answer)
4.7/5
(24)

It is legal to declare more than one variable in a single statement.

(True/False)
4.9/5
(38)

Given the following code fragment, what is the final value of y? Int x, y; X = -1; Y = 0; Whilex < 3) { Y += 2; X += 1; }

(Multiple Choice)
4.7/5
(42)

The opposite of less than is greater than

(True/False)
4.9/5
(46)

Write the loop condition to continue a while loop as long as x is negative. ____________________

(Short Answer)
4.9/5
(30)

int myValue; is called a _______________________.

(Short Answer)
4.9/5
(32)

What is the value of x after the following statements? Float x; X = 15/4;

(Multiple Choice)
4.7/5
(34)
Showing 21 - 40 of 57
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)