c++ quiz 3

¡Supera tus tareas y exámenes ahora con Quizwiz!

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

false, left to right

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

reads as 10 +5 equals 15, -2 equals 13, 13 tiimes 3 equals 39

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

setw( )

These can be used to override the rules of operator precedence in a mathematical expression..

( ) parentheses

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

+

What is the value of average after the following code executes? double average; average = 1.0 + 2.0 + 3.0 / 3.0;

4.0

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

3*2

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

>>, <<

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

cin

Which statement is equivalent to the following? x = 2 * x; x * 2; x *= 2; x = x * x; x * x = x;

x *= 2;


Conjuntos de estudio relacionados

Anatomy & Physiology II: Endocrine System

View Set

Life and Health Insurance Policies

View Set

HNO Online Hospital Newcomers Orientation

View Set

Types of Life Insurance Policies

View Set

NeuroScience Week #7 Cranial Nerves

View Set

Chapter 4: Diseases and Disorders of the Skin

View Set