Exam 2: Basic Elements of C++

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

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

Free
(True/False)
5.0/5
(72)
Correct Answer:
Verified

True

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

Free
(Multiple Choice)
4.8/5
(80)
Correct Answer:
Verified

B

The memory allocated for a float value is ____ bytes.

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

B

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

(Short Answer)
4.9/5
(80)

The maximum number of significant digits is called the ____________________.

(Short Answer)
4.8/5
(78)

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

(Multiple Choice)
4.9/5
(91)

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

(Multiple Choice)
4.9/5
(61)

____________________ functions are those that have already been written and are provided as part of the system.

(Short Answer)
4.8/5
(75)

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

(True/False)
4.8/5
(71)

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

(Multiple Choice)
4.8/5
(75)

____________________ is the process of planning and creating a program.

(Short Answer)
5.0/5
(82)

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

(Short Answer)
4.9/5
(72)

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

(Multiple Choice)
4.7/5
(77)

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.7/5
(65)

A comma is also called a statement terminator.

(True/False)
4.9/5
(76)

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

(Multiple Choice)
4.8/5
(76)

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

(Multiple Choice)
4.7/5
(78)

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

(Multiple Choice)
4.9/5
(82)

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

(Multiple Choice)
4.9/5
(80)

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

(Short Answer)
4.9/5
(76)
Showing 1 - 20 of 50
close modal

Filters

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