Quiz 9 - Closure

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

[APUE07] With a C program (memory map), ____ stores the information that is saved each time a function is called. Each time a function is called, the address of where to return to and certain information about the caller's environment, such as some of the machine registers, are saved on ____.

Stack

2
New cards

[APUE07] With a C program (memory map), ______ consists of the machine instructions that the CPU executes.

Text Segment

3
New cards

[APUE07] With a C program (memory map), the _____ command reports the sizes (in bytes) of the text, data, and bss segments.

size

4
New cards

[APUE07] With a C program (memory map), data in _____ is initialized by the kernel to arithmetic 0 or null pointers before the program starts executing. The C declaration (for example, "long sum[1000];") appearing outside any function causes this variable to be stored in _____.

Uninitialized Data Segment

5
New cards

[closure] The _______ environment binds the non-local names to the corresponding variables in the lexical environment at the time the closure is created.

Referencing

6
New cards

[APUE07] With a C program (memory map), the newly called function allocates room on ______ for its automatic and temporary variables for each time it is called. This is how recursive functions in C can work.

Stack

7
New cards

[APUE07] With a C program (memory map), ______ is where dynamic memory allocation usually takes place including object instances.

Heap

8
New cards

[closure] Closures are techniques for implementing lexically scoped binding in languages with _____.

First-class functions

9
New cards

[closure] Some C libraries support ____ which is sometimes implemented by providing two values when registering this with the library: a function pointer and a separate void* pointer to arbitrary data of the user's choice.

callback

10
New cards

[APUE07] With a C program (memory map), usually ______ is sharable so that only a single copy needs to be in memory for frequently executed programs, such as text editors, the C compiler, the shells, and so on.

Text Segment

11
New cards

[closure] This programming language _____ enables defining function objects by overloading "operator( )" and also supports closures.

C++

12
New cards

[APUE07] With a C program (memory map), _______, often called the ''bss'' segment, named after an ancient assembler operator that stood for ''block started by symbol.''

Uninitialized Data Segment

13
New cards

[closure] Which mathematical subject was utilized for the evaluation of expressions in closures?

Lambda Calculus

14
New cards

[APUE07] With a C program (memory map), _____ contains variables that are specifically initialized in the program.

Initialized Data Segment