Binary
ADTs and I/O
Memory
Program translation
100

The operator that sets a bit in the result if both operands have that bit set

What is AND (&)?

100

This keyword can be used to define/alias one type as another.

What is typedef?

100

The function that expands or shrinks an existing heap block.

What is realloc?

100

The C compiler runs this step at the very beginning

What is the preprocessor?

200

The (unsigned) decimal form of these binary numbers

1101010
0011111
0101010

What are 106, 31, and 42?

200

This function must be called once you are done using a file.

What is fclose?

200

This data structure represents values that can be multiple types by allowing its fields to overlap.

What is a union?

200

What the parser converts the program source code into

What is a syntax tree?

300

The bitwise formula to find the second bit of an integer

(eg. f(0010) = 1, f(1000) = 0)

What is (x >> 1) & 1 or (x & 2) >> 1?

300

Two functions an ADT should always have

What are a constructor/destructor (alloc/free, new/delete, etc)?

300

Two kinds of problem you can encounter by managing heap memory incorrectly.

What are dangling pointers and memory leaks?

300

This program combines multiple object modules into an executable file

What is the linker?

400

The (decimal) result of

(3 + ~7) & (-4 ^ 2)

Assuming 4-bit signed integers

What is -6?

400

The possible string arguments to the fopen function that determine how the file can be used.

What are "r", "r+", "w", "w+", "a", and "a+"?

400

A line of code that allocates space for 12 doubles and assigns it to a variable.

What is the following?:


double *x = malloc(12 * sizeof(double));
400
This step checks that variables and functions are defined and have the right types.

What is semantic analysis?