COP1334-ch3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

3 * 2

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

(Parentheses)

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

-3

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

left to right

Associativity is either right to left or

>>, <<

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

cin object

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

true

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

Ten

The statement

false

The statement

setw

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

fixed

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

cstdlib

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

4.0

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

39

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

2

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

13

What will the value of x be after the following statements execute?

True

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

overflows

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

Parentheses

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

data type of the variable

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

+

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

7

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

number = number + 1;

Which statement is equivalent to the following?

x *= 2;

Which statement is equivalent to the following?

getline(cin, address);

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


Kaugnay na mga set ng pag-aaral

Ch. 12: Fundamentals of the Nervous System and Nervous Tissue

View Set

Chem180; Chapter 2: Measurements

View Set

BICSI Technician- Netcom - Chapter 1

View Set