Like this study set? Create a free account to save it.

Sign up for an account

Already have a Quizlet account? .

Create an account


When this operator is used with string operands it concatenates them, or joins them together.

data type of the variable

When the final value of an expression is assigned to a variable, it will be converted to:

left to right

Associativity is either right to left or


The statement

cin >> setw(10) >> str;

will read up to this many characters into str


Which line in the following program will cause a compiler error?

1 #include <iostream>
2 using namespace std;
4 int main()
5 {
6 const int MY_VAL = 99;
7 MY_VAL = 77;
8 cout << MY_VAL << endl;
9 return 0;
10 }


This stream manipulator forces cout to print the digits in fixed-point notation.


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

number = number + 1;

Which statement is equivalent to the following?

number += 1;

x *= 2;

Which statement is equivalent to the following?

x = x * 2;


The statement

cout << setprecision(5) << dollar << endl;

will output $5.00 to the screen.

3 * 2

In the following C++ statement, what will be executed first according to the order of precedence?

result = 6 - 3 * 2 + 7 - 10 / 2;


When C++ is working with an operator, it strives to convert the operands to the same type.


You can use these to override the rules of operator precedence in a mathematical expression.


What is the value of number after the following statements execute?

int number = 10;
number += 5;
number -= 2;
number *= 3;


What will the value of result be after the following statement executes?

result = 6 - 3 * 2 + 7 - 10 / 2;


What is the value of average after the following code executes?

double average;
average = 1.0 + 2.0 + 3.0 / 3.0;


The cin >> statement will stop reading input when it encounters a newline character.


This manipulator is used to establish a field width for the value immediately following it.

>>, <<

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


Assume that x is an int variable. What value is assigned to x after the following assignment statement is executed?

x = -3 + 4 % 6 / 5;

cin object

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


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;


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

getline(cin, address);

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

string address;


To use the rand() function, you must #include this header file in your program.

Please allow access to your computer’s microphone to use Voice Recording.

Having trouble? Click here for help.

We can’t access your microphone!

Click the icon above to update your browser permissions and try again


Reload the page to try again!


Press Cmd-0 to reset your zoom

Press Ctrl-0 to reset your zoom

It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

Please upgrade Flash or install Chrome
to use Voice Recording.

For more help, see our troubleshooting page.

Your microphone is muted

For help fixing this issue, see this FAQ.

Star this term

You can study starred terms together

Voice Recording