Chapter 2 C++

Pataasin ang iyong marka sa homework at exams ngayon gamit ang 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


Kaugnay na mga set ng pag-aaral

chromosomes and cell division (mitosis)

View Set

Nutrition 110 - Basics of Nutrition

View Set

Exam 1 Eco for Strategic Decisions

View Set

Chapter 37: Management of Patients with Musculoskeletal Trauma

View Set