Chapter 2 Flashcards Preview

Programming Fundamentals > Chapter 2 > Flashcards

Flashcards in Chapter 2 Deck (36)
Loading flashcards...
1

//

single line comment

2

#__

preprocessor directives

3

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

iostream

4

displays screen output; a stream object; consule output

cout

5

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

namespace std

6

marks beg of main fcn

int main()

7

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

function

8

all statements that make up fcn are enclosed in ___

left and right braces {}

9

"----", where --- is a group of characters

string literal or string constant

10

marks end of complete statement

;

11

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

return 0

12

works w/ streams of data

stream object

13

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

14

sends output to beg of next line for subsequent printing

endl, a stream manipulator

15

an alt way to do a newline

\n, an escape sequence

16

storage location in comp's memory

variable

17

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

literal

18

tells compiler variable's name and data type

variable definition

19

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

assignment operator

20

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

identifier

21

numeric data types

integer and floating point

22

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

character

23

enclosed in single quotation marks, take one byte of memory

character literals

24

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

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