This is the effect of the 'static' keyword.
What is makes global variables private to the current file and local variables persistent between function calls?
This keyword tells the compiler that a pointer points to a unique location.
What is restrict?
This step of program translation turns an assembly language file into a machine language file.
What is assembling?
This function is used to create a thread.
What is pthread_create?
These are two ways to measure performance.
What are time complexity, runtime, memory usage, power usage?
This is the decimal value of the signed 8-bit number binary number 1111 1001.
What is -7?
Local variables with the volatile keyword are stored in this memory segment.
What is the stack?
This kind of type checking happens during compile time.
What is static type checking?
This function is used to duplicate the current process.
What is fork?
This type is used to store generic data.
What is void *?
This is the result of the following bitwise operations (decimal):
char c = 93;
(c >> 2) ^ 1 = _____
What is 22?
These are the 5 memory segments and what is stored in each.
What are
Text (executable code)
BSS (uninitialized and zero-initialized global variables)
Data (initialized global variables)
Heap (dynamically allocated memory)
Stack (local variables and stack frames)
?
This step combines multiple object files into an executable.
What is linking?
This function is used to exit a process without destroying resources shared with its parent process.
What is _exit?
C is part of this language paradigm.
What is imperative?
Given the following enum, this is a macro that evaluates to true if its input is a weekday.
enum days{ Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
What is #define WEEKDAY(day) ((day) >= Monday && (day) <= Friday) ?
These are 3 resources that a thread shares with its parent process.
What are text, data, bss, process control block?
These are the parts of the compiler.
What are lexical analyzer, syntax analyzer, semantic analyzer, intermediate code generator, assembly code generator?
These are the 2 types of virtual memory systems we discussed.
What are segmentation and paging?
These are the 3 main goals of the operating system.
What are resource management, abstraction, and protection?
This is the output of the following code:
What is segmentation fault?
This is a problem with the following code and how to fix it.
What is memory must be allocated for each word, not just the pointers to the words; strcpy is copying to random memory addresses?
Two parts, each worth 500 points:
1. This is the output of the following program.
2. This is the memory segment where each variable is stored (hint: there are 5 variables).
1. What is "error :( -60"?
2. What are count: BSS; error_message: data; count: stack; num: stack; arr: stack?
This is the output of the following code.
What is Hello there?
These are two security risks present in the following code:
What are buffer overflow and plaintext passwords?