Primer Flashcards

1
Q

switch

A

allows a variable to be tested for equality against a list of values or case, must have integral or enumerated type

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

translational unit

A

basic unit of compilation, consists of a single source file plus header files, complied into object files that are joined together by the linker

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

object file

A

a single translation unit can be compiled into this

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

static limits

A

scope to the translation unit, static objects in a source file are not accessible outside their source file

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

file scope

A

global, declared outside of any function, structure or union declaration, begins right after its declaration and runs to the end of the translation unit

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

block scope

A

a name if it’s declared within a function, scope begins right after its declaration and runs to the end of the block immediately enclosing that declaration

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

function prototype scope

A

declared in the function parameter list, scope begins right after its declaration and runs to the end of the parameter list

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

function scope

A

ONLY statement labels, can be defined only in the body of a function and scope is everywhere in that body, even before the label has been defined

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

lifetime

A

the time duration where an object/variable is in a valid state

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

conditional (ternary) operator

A

(condition) ? (if true) : (if false);

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

reference variable

A

a variable that references an object (alias), once declared it cannot be changed to reference a different object, has the same memory address as the item it references

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

array

A

a sequence in memory of like items, NOT data types, size must be explicit at complementary time and memory is allocated at complementary time, an array name is the address of its first element

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

stream

A

entity where a program can either insert or extract characters, console is represented by cin and cout, output files can be formatted using I/O manipulators

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

Computer Memory

A

Writable or non-writable, Executable or non-executable, Initialized or uninitialized.

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

Stack

A

Managed automatically by compiler (writable, non-executable).

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

Dynamic Data

A

Managed by programmer (writable, non-executable).

17
Q

Static Data

A

Created by programmer (readable, non-executable).

18
Q

Initialized Data

A

Initialized at start of program (readable, non-executable).

19
Q

Program Code

A

Read from a program file (readable, executable).