quiz 2

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following is a legal identifier?

program_1

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

Sunny Day

Suppose that sum and num are int variables and sum = 5 and num = 10. After the statement sum += num executes, ____.

sum = 15

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

syntax

Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.

alpha = 50

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

alpha = beta; beta = beta - 1;

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

____ is a valid char value.

'A'

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

____ is a valid int value.

46259

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

9

A comma is also called a statement terminator. (True or False?)

False

A mixed arithmetic expression contains all operands of the same type. (true or false?)

False

An operator that has only one operand is called a unique operator. (true or false?)

False

If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right. (true or false?)

True

Suppose we declare a variable sum as an int. The statement " sum += 7; " is equivalent to the statement " sum = sum + 7; " . (True or False?)

True

Which of the following is the newline character?

\n

Which of the following is a reserved word in C++?

char

An example of a floating point data type is ____.

double


संबंधित स्टडी सेट्स

ICND2 - 3. Troubleshooting Basic Connectivity

View Set

Intro to Valuation: The Time Value of Money

View Set

NUR 1068 Health Assessment Ch 14- Assessing skin, hair, and nails

View Set

Lab Practicum #2 Question Set - 7. Oxidase Test

View Set