Chapter 2 C++

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following lines must be included in a program that has string variables?

Hinclude <string

Which of the following statements correctly assigns the character Mto the variable named letter?

Letter = 'M';

The float data type is considered ———precision and the double data type is considered ———precision.

O single, double

A named constant is like a variable, but it its content cannot be changed while the program is running.

True

Every complete C++ program must have a

function named main

Which of the following is NOT a valid C++ identifier?

luser

Assuming that a program has the following string object definition, which statement correctly assigns the string literal "Jane" to the string object? stringe name

name = "Jane";

Astatement that starts with a hashtag (or pound) symbol (#) is called a

preprocessor directive

In the following statement, the characters Hello! are a(n) cout « "Hello!";

string literal

Which of the following must be included in any program that uses the cout object?

the header file Lostream

A variable definition tells the computer

the variable's name and the type of data it will hold

What will the following code display? int number - 23; cout << "The number is " << "number" << endl;

• The number is number


Set pelajaran terkait

Risk and Insurance Chapter 10 and 16

View Set

chromosomes and cell division (mitosis)

View Set

65- sec 4: Regulation of Securities and Issuers

View Set

Nutrition 110 - Basics of Nutrition

View Set

Pain/tissue integrity practice questions

View Set

Exam 1 Eco for Strategic Decisions

View Set