Exam 2: Basic Elements of C

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

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

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

(True/False)
4.8/5
(39)

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

(Multiple Choice)
4.9/5
(36)

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

(True/False)
4.9/5
(49)

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

(Short Answer)
4.8/5
(44)

Suppose that sum is an int variable. The statement sum += 7; is equivalent to the statement sum = sum + 7;

(True/False)
4.8/5
(41)

Consider the following code. // Insertion Point 1 using namespace std; const float PI = 3.14; Int main() { \quad //Insertion Point 2 \quad float r = 2.0; \quad float area; \quad area = PI * r * r; \quad cout << "Area = " << area << endl; \quad return 0; } // Insertion Point 3 In this code, where does the include statement belong?

(Multiple Choice)
4.8/5
(35)

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

(True/False)
4.7/5
(40)

A comma is also called a statement terminator.

(True/False)
4.7/5
(42)

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

(Multiple Choice)
4.8/5
(39)

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

(Multiple Choice)
4.9/5
(41)

The value of the expression 17 % 7 is ____.

(Multiple Choice)
4.8/5
(31)

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

(Multiple Choice)
4.7/5
(38)

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

(Multiple Choice)
4.8/5
(39)

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

(True/False)
4.7/5
(36)

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

(Short Answer)
4.8/5
(35)

____ is a valid int value.

(Multiple Choice)
4.8/5
(40)

Which of the following is a legal identifier?

(Multiple Choice)
4.7/5
(33)

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

(Short Answer)
4.9/5
(38)

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, ____.

(Multiple Choice)
4.9/5
(33)
Showing 21 - 40 of 50
close modal

Filters

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