Programming ch2

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

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

Four score and seven years ago

In C++11, if you want an integer literal to be treated as a long long int, you can append ________ at the end of the number.

LL

What will the following code display? cout << "Monday"; cout << "Tuesday"; cout << "Wednesday";

MondayTuesdayWednesday

A variable definition tells the computer

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

In memory, C++ automatically places a(n) ________ at the end of string literals which ________

null terminator, marks the end of the string

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

preprocessor directive

#include directive

-an instruction that tells the computer to merge the source code from one file with the source code from another file -pre processor directive - do not include semicolon at the end

What will the following code display? int x = 23, y = 34, z = 45; cout << x << y << z << endl;

233445

What is the value of number after the following statements execute?int number; number = 18 / 4;

4

Which of the following statements correctly defines a named constant named TAX_RATE that holds the value 0.075?

const double TAX_RATE = 0.075;

Data items whose values do NOT change while the program is running are

literals

A character literal is ________, whereas a string literal is _______

enclosed in single quotation marks, enclosed in double quotation marks

The data type used to declare variables that can hold real numbers is

float

Which part of the following line is ignored by the compiler? double userName = "janedoe"; // user's name is janedoe

user's name is janedoe

A(n) ________ represents a storage location in the computer's memory. Group of answer choices

variable


संबंधित स्टडी सेट्स

ch 8 health laws and regulations quiz

View Set

Weekly Challenge 2 - Google Project Management

View Set

BUS STATS: CH 5 - Discrete Probability

View Set

Federal Tax COnsiderations for Life Insurance

View Set

Chapter 10,11,12 Child Development

View Set