Quiz 2 programming

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

The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to ____.

13

The length of the string "computer science" is ____.

16

suppose that count is an int variable and count = 1. After the statement count++; executes, the value of count is

2

The value of the expression 17 % 7 is ____.

3

The value of the expression 33/10, assuming both values are integral data types, is ____.

3

Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent to the statement(s) ____.

beta = beta +1;

____________ is a valid int value

46259

The expression static_cast<int>(9.9) evaluates to ____.

9

In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >> two; executes, ____.

one = 10.5 , two = 30.6

which of the following is a legal identifier

program_1

____ are executable statements that inform the user what to do.

prompt lines

The ____ rules of a programming language tell you which statements are legal, or accepted, by the programming language.

syntax

If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.

true

Suppose a = 5. After the execution of the statement ++a; the value of a is 6

true

the maximum number of significant digits in values of the double type is 15

true

Choose the output of the following C++ statement: cout << "Sunny" << :\n; << "pay " << endl;

Day

which of the following is the newline character

\n

________ is a valid char value

'A'

An example of a floating point data type is ____.

double

The memory allocated for a double value is ______________ bytes

eight

A mixed arithmetic expression contains all operands of the same type.

false


Conjuntos de estudio relacionados

4.7 Magnetism and electromagnetism

View Set

Chapter 16 Fluid and Electrolytes Practice Questions

View Set

Project Cost Management - Ch 7 (True/False)

View Set

18. Understanding Wireless Client Authentication

View Set

Chapter 1 People's Health An Introduction

View Set

Level H, Unit 11: Completing the Sentences

View Set

Chapter 13 "Integrated Training and the OPT Model"

View Set