C Programming
Memory & Pointers
Program Translation
Threads & Processes
Random MOPs
100

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?

100

This keyword tells the compiler that a pointer points to a unique location.

What is restrict?

100

This step of program translation turns an assembly language file into a machine language file.

What is assembling?

100

This function is used to create a thread.

What is pthread_create?

100

These are two ways to measure performance.

What are time complexity, runtime, memory usage, power usage?

200

This is the decimal value of the signed 8-bit number binary number 1111 1001.

What is -7?

200

Local variables with the volatile keyword are stored in this memory segment.

What is the stack?

200

This kind of type checking happens during compile time.

What is static type checking?

200

This function is used to duplicate the current process.

What is fork?

200

This type is used to store generic data.

What is void *?

300

This is the result of the following bitwise operations (decimal):

char c = 93;

(c >> 2) ^ 1 = _____

What is 22?

300

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)

?

300

This step combines multiple object files into an executable.

What is linking?

300

This function is used to exit a process without destroying resources shared with its parent process.

What is _exit?

300

C is part of this language paradigm.

What is imperative?

400

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)  ?

400

These are 3 resources that a thread shares with its parent process.

What are text, data, bss, process control block?

400

These are the parts of the compiler.

What are lexical analyzer, syntax analyzer, semantic analyzer, intermediate code generator, assembly code generator?

400

These are the 2 types of virtual memory systems we discussed.

What are segmentation and paging?

400

These are the 3 main goals of the operating system.

What are resource management, abstraction, and protection?

500

This is the output of the following code:

What is segmentation fault?

500

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?

500

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?

500

This is the output of the following code.

What is Hello there?

500

These are two security risks present in the following code:

What are buffer overflow and plaintext passwords?

M
e
n
u