Exam 2: Introduction to C++

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

A character literal is enclosed in ________ quotation marks, whereas a string literal is enclosed in ________ quotation marks.

Free
(Multiple Choice)
4.7/5
(73)
Correct Answer:
Verified

D

What will the value of x be after the following statements execute? int x; x = 18 / 4;

Free
(Multiple Choice)
4.7/5
(71)
Correct Answer:
Verified

B

These are data items whose values do not change while the program is running.

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

A

In memory, C++ automatically places a ___________ at the end of string literals.

(Multiple Choice)
4.8/5
(83)

What will the following code display? cout << "Four" << "score" << endl; cout << "and" << "seven" << endl; cout << "years" << "ago" << endl;

(Multiple Choice)
4.8/5
(67)

What will the value of x be after the following statements execute? int x; x = 18 % 4;

(Multiple Choice)
4.9/5
(78)

The float data type is considered _____ precision, and the double data type is considered _______ precision.

(Multiple Choice)
4.9/5
(81)

The first step in using the string class is to #include the ___________ header file.

(Multiple Choice)
4.9/5
(94)

Character constants in C++ are always enclosed in ______.

(Multiple Choice)
4.8/5
(81)

This function in C++ allows you to identify how many bytes of storage on your computer system an integer data value requires.

(Multiple Choice)
4.8/5
(78)

____________ must be included in any program that uses the cout object.

(Multiple Choice)
4.8/5
(92)

If you use a C++ key word as an identifier, your program will:

(Multiple Choice)
4.8/5
(84)

What will the following code display? cout << "Four\n" << "score\n"; cout << "and" << "\nseven"; cout << "\nyears" << " ago" << endl;

(Multiple Choice)
4.9/5
(82)

Which character signifies the beginning of an escape sequence?

(Multiple Choice)
4.9/5
(81)

If you do not follow a consistent programming style, your programs will generate compiler errors.

(True/False)
4.8/5
(75)

In a C++ program, two slash marks ( // ) indicate:

(Multiple Choice)
4.8/5
(72)

Look at the following program and answer the question that follows it. Look at the following program and answer the question that follows it.   Which line(s) in this program cause output to be displayed on the screen? Which line(s) in this program cause output to be displayed on the screen?

(Multiple Choice)
4.9/5
(56)

_____________ represent storage locations in the computer's memory.

(Multiple Choice)
4.9/5
(83)

The numeric data types in C++ can be broken into two general categories:

(Multiple Choice)
4.8/5
(84)

A statement that starts with a # is called a:

(Multiple Choice)
4.8/5
(85)
Showing 1 - 20 of 56
close modal

Filters

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