Ch. 3 Chapter Quiz

Ace your homework & exams now with Quizwiz!

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

4.0

Assume that x is an int variable. What value is assigned to x after the following assignedment is executed? x=-3+4%6/5

-3

What will the value of x be after the following statement execute? intx=0 inty=5 intz=4; x=y+z*2

13

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

3*2

When a variables is assigned a number that is too large for its data type, it ___

overflows

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

significant digits and precision

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

cin oject

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

cin.get(address);

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

cin.ignore

The function, pow(x,5.0), requires this header file

cmath

When using the sqrt function you must include this header file

cmath

To use the rand() function, you must first #include this header into your program

cstblib

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

fixed

____ reads a line of input, including leading and embedded spaces; and stores it in a string object

getline

Which is true about the following statement cout<< setw(4)<<num4<< " ";

it allows four spaces for the value in the variable num4

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

left

Associativity is either right to left or:

left to right

The statement cin>>setw(10)str; will read up to this many characters into str.

nine

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

the data type of the variable


Related study sets

Pharmacology Exam 2 NCLEX Questions

View Set

Study set 14 for RN NCLEX (Kaplan)

View Set

Psychopathology- Ch.6 Somatic Symptom+Dissociative Disorders

View Set

Unit: 9. CANADA - OUR NORTHERN NEIGHBOR Test 5th Grade

View Set

Chapter 21: Poverty, Inequality, and Discrimination

View Set