Name it
Name it (the sequel)
Memory segments
C stuff
Misc
100

In C, what do you call a collection of values of the same type?

Array

100

What is the name of the converter from a high level language to assembly?

Compiler proper

100

What is each segment of the memory layout of a process in order?

Text, data, BSS, heap, stack

100

When including a header file, when do you use <>s vs “”s?

Standard library vs your own file

100

Is Java a high or low level language? What about C?

Both HHL

200

In C, what do you call a collection of values of possibly different types?

Struct

200

What is the name of the converter from assembly to machine code?

Assembler

200

Which of the variables in the following program are stored on the stack?

d, e, f, g
200

What is the size of an int (on the CS machines)?

4 bytes

200

How should you order the data members in a struct to minimize the size of the struct?

In order from largest to smallest

300

What do you call the last character of a string?

The null terminator / null byte

300

What is the name of the type specifier that allows local variables to retain their value between function runs?

static

300

Which of the following variables are stored in the data segment?

b, i

300

If you declare a local variable int with the static keyword, but do not initialize it, what will its value be? What if it's not static?

0. Indeterminate.

300

Which of the following lines of code fail to compile?

4 & 5

400

What do you call it when a variable disappears automatically when it is no longer needed?

Automatic duration

400

What is the name of the type specifier that makes global variables local to the file they are in?

static

400

Which of the following variables are stored in the BSS segment?

a, c, h, j

400

Can you create an array in a function, and then return it?

Yes, but it will be undefined behavior

400

What is it called when in memory, a 2d array is stored with each row together?

Row major

500

What do you call the preprocessor pattern that prevents a header file from being included multiple times?

Include guard

500

What is the more concise way to write (*myStructurePointer).attribute?

myStructurePointer->attribute

500

In the program, what will be stored in the text region, and what will be stored in the heap region?

The compiled code (machine code instructions) will be in the text region, and nothing in this program will be in the heap.

500

What are the rules of struct alignment?

Each member’s address must be a multiple of its size, and the total size must be a multiple of 8

500

What is Miles’s preference for writing pointers? int *p, int * p, int* p, or int*p?

int* ptr