Exam 3: Expressions and Interactivity

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The ________ stream manipulator can be used to establish a field width for the value immediately following it.

(Multiple Choice)
4.8/5
(71)

________ can be used to override the rules of operator precedence.

(Multiple Choice)
4.8/5
(69)

The ________ object causes data to be input from the keyboard.

(Multiple Choice)
4.8/5
(80)

The following two statements will assign the same value to result. result = a + b * c; result = b * c + a;

(True/False)
4.9/5
(75)

The following statement number = rand() % 5 + 10; Assigns number a value in the range of

(Multiple Choice)
4.9/5
(75)

________ causes a program to wait until information is typed at the keyboard and the Enter key is pressed.

(Multiple Choice)
4.8/5
(76)

The following pair of C++ statements will cause 3.5 to be output. double number = 7 / 2; cout << number;

(True/False)
4.9/5
(75)

Which of the following expressions will evaluate to 2.5?

(Multiple Choice)
4.9/5
(74)

The following two expressions evaluate to the same thing: c + a * b c + (a * b)

(True/False)
4.8/5
(72)

When an arithmetic expression contains two or more different operators, such as * and +, the order in which the operations is done is determined by

(Multiple Choice)
4.9/5
(74)

When converting some algebraic expressions to C++, you may need to insert ________ and ________ that do not appear in the algebraic expression.

(Multiple Choice)
4.7/5
(78)

The only difference between C-strings and string objects is how they are declared and internally stored. They are used exactly the same way.

(True/False)
4.9/5
(76)

Which of the following statements about named constants is/are True?

(Multiple Choice)
4.8/5
(78)

The statement cout << setw(4) << num4 << " ";

(Multiple Choice)
4.8/5
(83)

The following 4 lines of C++ code, use strings. string firstName; // Define a string object Char lastName[7]; // Define a C-string FirstName = "Abraham"; // Assign a value to the string object LastName = "Lincoln"; // Assign a value to the C-string Which of the following statements is /are True?

(Multiple Choice)
4.9/5
(84)

The following statement sets sum1, sum2, and sum3 all to zero. sum1 = sum2 = sum3 = 0;

(True/False)
4.9/5
(83)

In any program that uses the cin object, you must #include

(Multiple Choice)
4.8/5
(72)

Operator associativity is either left to right or

(Multiple Choice)
4.8/5
(74)

Which of the following statements doubles the value stored in answer?

(Multiple Choice)
4.9/5
(81)

When an operator has two operands of different data types, C++ always converts them both to double before performing the operation.

(True/False)
4.8/5
(70)
Showing 21 - 40 of 40
close modal

Filters

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