Exam 3: Expressions and Interactivity

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

What is the value stored at x, given the statements: int x; x = 3 / static_cast<int>(4.5 + 6.4);

(Multiple Choice)
4.8/5
(39)

The statement cout << setprecision(5) << dollars << endl; will output $5.00 to the screen.

(True/False)
4.9/5
(38)

What will the value of result be after the following statement executes? result = 6 - 3 * 2 + 7 - 10 / 2 ;

(Multiple Choice)
4.7/5
(37)

___________reads a line of input, including leading and embedded spaces, and stores it in a string object.

(Multiple Choice)
4.8/5
(39)

The total number of digits that appear before and after the decimal point is sometimes referred to as:

(Multiple Choice)
4.9/5
(42)

This manipulator causes the field to be left-justified with padding spaces printed to the right.

(Multiple Choice)
4.8/5
(40)

What will the value of x be after the following statements execute? int x = 0; Int y = 5; Int z = 4; X = y + z * 2;

(Multiple Choice)
4.9/5
(36)

When the fixed manipulator is used, the value specified by the setprecision manipulator will be the number of digits to appear after the decimal point.

(True/False)
4.9/5
(35)

Which statement will read an entire line of input into the following string object? string address;

(Multiple Choice)
4.9/5
(39)

Which line in the following program will cause a compiler error? 1 \quad #include <iostream> 2 \quad using namespace std; 3 4 \quad int main() 5 \quad { 6 \quad\quad const int MY_VAL = 77; 7 \quad\quad MY_VAL = 99; 8 \quad\quad cout << MY_VAL << endl; 9 \quad\quad return 0; 10 \quad }

(Multiple Choice)
4.8/5
(34)

When a variable is assigned a number that is too large for its data type, it:

(Multiple Choice)
4.8/5
(42)

The ______ operator always follows the cin object, and the ______ operator follows the cout object.

(Multiple Choice)
5.0/5
(39)

In the following C++ statement, what will be executed first according to the order of precedence? result = 6 - 3 * 2 + 7 - 10 / 2 ;

(Multiple Choice)
4.8/5
(34)

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

(Multiple Choice)
4.8/5
(30)

If you want to know the length of the string that is stored in a string object, you can call the object's size member function.

(True/False)
4.8/5
(44)

This statement will pause the screen, until the [Enter] key is pressed.

(Multiple Choice)
4.9/5
(38)

This function tells the cin object to skip one or more characters in the keyboard buffer.

(Multiple Choice)
4.9/5
(33)

Which statement is equivalent to the following? number += 1;

(Multiple Choice)
4.9/5
(41)

What is the value of number after the following statements execute? int number = 10; Number += 5; Number -= 2; Number *= 3;

(Multiple Choice)
4.8/5
(41)

Arithmetic operators that share the same precedence have right to left associativity.

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

Filters

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