Exam 2: Introduction to C++

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

C++ automatically places at the end of a string constant (string literal).

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

E

The following is a legal C++ statement to define and initialize a variable. char firstName = "Jack";

Free
(True/False)
4.7/5
(44)
Correct Answer:
Verified

False

data types are used to define variables that can hold real numbers.

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

A

A C++ character constant (character literal)is enclosed in quotation marks, whereas a string constant (string literal)is enclosed in quotation marks.

(Multiple Choice)
4.9/5
(41)

If number has been defined as an int variable, both of the following statements will print out its value: cout << number; cout << "number";

(True/False)
4.7/5
(36)

What value will be assigned to the variable number by the following statement? What value will be assigned to the variable number by the following statement?

(Multiple Choice)
4.8/5
(31)

The following statements both declare the variable num to be an integer. int num; INT num;

(True/False)
4.9/5
(42)

are data items whose values cannot change while the program is running.

(Multiple Choice)
4.8/5
(34)

A _ variable can hold only one of two values: true or false.

(Multiple Choice)
4.8/5
(44)

A variable must be defined

(Multiple Choice)
4.8/5
(31)

The expression 5 / 2 evaluates to

(Multiple Choice)
4.8/5
(37)

A variable of the char data type can hold a set of characters like "January".

(True/False)
4.8/5
(38)

The expression 5 % 2 evaluates to

(Multiple Choice)
5.0/5
(35)

Variables represent storage locations in the computer's memory.

(True/False)
4.8/5
(38)

The numeric data types in C++ are broken into two categories:

(Multiple Choice)
4.9/5
(31)

The following two statements could be used interchangeably in a C++ program. // Program Payroll /* Program Payroll */

(True/False)
4.8/5
(32)

What value will be assigned to the variable number by the following statement? int number = 3.75;

(Multiple Choice)
4.8/5
(30)

The is used to display information on the computer's screen.

(Multiple Choice)
4.9/5
(41)

What literal(s)appear in the following C++ statement? int number = 4 + 8;

(Multiple Choice)
4.8/5
(36)

Which of the following is/are valid C++ identifiers?

(Multiple Choice)
4.9/5
(33)
Showing 1 - 20 of 40
close modal

Filters

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