Ch. 2 Chapter Quiz

Ace your homework & exams now with Quizwiz!

These are used to declare variables that can hold real numbers

floating point data types

A statement that starts with a # is called a:

preprocessor directive

the first step in using the string class is to #include the ______ header file

string

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

the beginning of a comment

______must be included in any program that used the cout object

The header file iostream

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

The number is 7

______ represent storage location in the computers memory

Variables

Assume that a program has the following string object definition string name; which of the following statements assigns a string literal to the string object?

name = "jane";

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

not compile

in memory C++ automatically places a ____ at the end of string literals

null terminator

A character literal is enclosed in ______ quotation marks, where as a string literal is enclosed in ________ qutotation marks

single, double

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

sizeof

in programming terms, a group of characters inside a set of qoutations marks is called a

string literal

which one of the following would be an illegal variable dayOfWeek 3dGraph _employee_num June1997 itemsorderedforthemonth

3dgraph

what will the value of x be after the following statements execute intx; x= 18/4

4

what will the value of x be after the following statements execute x=18.0/4

4

The _____ causes the contents of another file to be inserted into a program.

# include directive

Character constants in C++ are always enclosed in________

'single quotation marks'

What is the output of the following statement? cout<< 4*(15/(1+3))<<endl;

12

you must have a _____ for every variable you intend to use in a program?

definition

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

integer and floating type

Which escape sequence causes the cursor to move to the beginning of the current line?

\r

this control sequence is used to skip over to the next horizontal tab stop

\t

For every opening brace in C++ program there must be a

closing brace

The ____ is/are used to display information on the computers screen.

cout object


Related study sets

History 800B Lesson 15 - Early Industry In The United States

View Set

Satire & A Modest Proposal & The Pardoner's Tale Study Guide

View Set

C_Activate12 SAP Certified Associate - SAP Activate Project Manager Practice Exam 1

View Set

Six Sigma Roles and Responsibilities Practice

View Set