1/23
Looks like no tags are added yet.
What does a C pointer store?
A memory address.
What does &x return?
The address of x.
What does *p mean in an expression?
The value or object at the address held by p.
What does int ***p declare?
A pointer to a pointer to a pointer to an integer.
How does pointer arithmetic scale?
p+i advances by i × sizeof(*p) bytes.
How are array indexing and pointer arithmetic related?
p[i] is equivalent to *(p+i).
What does *p++ do?
Uses the pointed-to value and advances the pointer.
What does (*p)++ do?
Increments the pointed-to value without changing the pointer.
What does *(++p) do?
Advances the pointer before dereferencing it.
Does C automatically check array bounds?
No.
What is NULL?
A null pointer value indicating that no object is pointed to.
How are arguments passed in C?
By value; passing pointers allows modification of pointed-to objects.
What does malloc do?
Allocates heap storage and returns a pointer or NULL on failure.
What does free do?
Releases dynamically allocated storage.
What is a memory leak?
Allocated memory is no longer needed but has not been released.
What is stored in the stack?
Function call information and typical automatic local variables.
What is stored in the heap?
Dynamically allocated data.
What is static storage?
Storage lasting throughout program execution.
What is a struct?
A composite data type grouping named fields.
What is typedef used for?
Creating an alias for a data type.
What does strlen count?
Characters before the terminating null byte.
What does strcmp return for equal strings?
0.
What does the linker do?
Combines object files and resolves references between compilation units.
What does the loader do?
Prepares an executable in memory for execution.