Chapter 2 Flashcards

(36 cards)

1
Q

//

A

single line comment

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

__

A

preprocessor directives

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

file contains code that allows C++ program to display output on screen and read input from keyboard; type of header file

A

iostream

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

displays screen output; a stream object; consule output

A

cout

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

used to organize names of program entities whose names are part of __ called __

A

namespace std

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

marks beg of main fcn

A

int main()

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

group of 1(+) prgrmming statements tht collectively has a name

A

function

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

all statements that make up fcn are enclosed in ___

A

left and right braces {}

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

”—-“, where — is a group of characters

A

string literal or string constant

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

marks end of complete statement

A

;

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

sends an integer value zero back to operating sys upon prgrm’s completion; indicates successful execution

A

return 0

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

works w/ streams of data

A

stream object

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

operator used to send messages to cout; stream insertion operator; item immediately to right will be sent

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

sends output to beg of next line for subsequent printing

A

endl, a stream manipulator

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

an alt way to do a newline

A

\n, an escape sequence

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

storage location in comp’s memory

17
Q

constant value that are assigned to variables; piece of data written directly into prgm’s code; common uses: 1) to assign a variable, 2) to display something on screen; aka constants

18
Q

tells compiler variable’s name and data type

A

variable definition

19
Q

1) evaluates right hand side to single rvalue 2) assigns rvalue to left hand side that must be an lvalue (able to receive a value) 3) returns that value to context it was initiated in

A

assignment operator

20
Q

prgmr-defined name that reps some element of a prgrm (eg: variable name); first character must be a-z, A-Z, or _; second can be all of the above and digits 0-9

21
Q

numeric data types

A

integer and floating point

22
Q

used to store individ characters, can only hold one character at time, can hold digits or letters; actually stored as integers (ASCII)

23
Q

enclosed in single quotation marks, take one byte of memory

A

character literals

24
Q

marks end of string, stored in last byte of memory of string literal

A

null terminator / null character

\0

25
a string type variable that will accept a string literal
string object
26
is held by data type that allows fractional values; stored in e notation
floating-point number
27
single precision
float data type
28
double precision; default for floating-point numbers
double data type
29
larger than double
long double
30
expressions that have a true or false value, where true is repd by 1 and false by 0
Boolean expressions
31
operator that will report back number of bytes of memory used by any data type or variable
sizeof()
32
assigning values to variables
initialization
33
tells compiler to det variables data type from initialization value
auto
34
dets where a variable can and cannot be used
scope
35
/* ----- */
multi-line comments
36
like a variable but its content is read only and can't be changed while prgm is running
named constant (const CAPITAL_NAME = value)