Exam 2: Basic Elements of C++

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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

Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
Verified

A

A data type is called ____________________ if the variable or named constant of that type can store only one value at a time.

Free
(Short Answer)
4.9/5
(32)
Correct Answer:
Verified

simple

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

Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
Verified

D

A(n) ____________________ is a sequence of zero or more characters.

(Short Answer)
4.9/5
(34)

The memory space for a(n) ____________________ data value is 64 bytes.

(Short Answer)
4.8/5
(33)

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

(True/False)
4.8/5
(32)

Suppose we declare a variable sum as an int.The statement "sum += 7;" is equivalent to the statement "sum = sum + 7;".

(True/False)
4.9/5
(31)

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

(Multiple Choice)
5.0/5
(30)

A(n) ____________________ is a collection of statements, and when it is activated, or executed, it accomplishes something.

(Short Answer)
4.9/5
(39)

In C++, you can use a(n) ____________________ to instruct a program to mark those memory locations in which data is fixed throughout program execution.

(Short Answer)
4.8/5
(29)

In a C++ program, ____________________ are used to separate special symbols, reserved words, and identifiers.

(Short Answer)
4.9/5
(41)

The maximum number of significant digits in float values is up to 6 or 7.

(True/False)
4.9/5
(36)

____ is a valid char value.

(Multiple Choice)
4.9/5
(42)

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

(Multiple Choice)
4.9/5
(28)

The memory allocated for a float value is ____ bytes.

(Multiple Choice)
4.9/5
(37)

____________________ is the process of planning and creating a program.

(Short Answer)
4.8/5
(38)

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

(Multiple Choice)
4.9/5
(38)

The declaration int a, b, c; is equivalent to which of the following?

(Multiple Choice)
4.9/5
(36)

Which of the following is a legal identifier?

(Multiple Choice)
4.9/5
(46)

In C++, reserved words are the same as predefined identifiers.

(True/False)
5.0/5
(38)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)