Ch 2 - Gaddis Flashcards

1
Q

Parts of a C++ program

A

C++ programs have parts and components that serve specific purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cout Object

A

Use the cout object to display information on the computer’s screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The #include directive

A

The #include directive causes the contents of another file to be inserted into the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Variables & literals

A

Variables represent storage locations in the computer’s memory. Literals are constant values that are assigned to variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Identifiers

A

Choose variable names that indicate what the variables are used for.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integer Data Types

A

There are many different types of data. Variables are classified according to their data type, which determines the kind of information that may be stored in them. Integer variables can only hold whole numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

C++ string class

A

Standard C++ provides a special data type for storing and working with strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Floating-point data types

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The bool data type

A

Boolean variables are set to either true or false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

sizeof

A

The sizeof operator may be used to determine the size of a data type on any system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Variable assignments and initialization

A

An assignment operation assigns, or copies, a value into a variable. When a value is assigned to a variable as part of the variable’s definition, it is called an initialization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Comments

A

Comments are notes of explanation that document lines or sections of a program. Comments are part of the program, but the compiler ignores them. They are intended for people who may be reading the source code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Named constants

A

Literals may be given names that symbolically represent them in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Programming style

A

Programming style refers to the way a programmer uses identifiers, spaces, tabs, blank lines, and punctuation characters to visually arrange a program’s source code. These are some, but not all, of the elements of programming style.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly