Strings and Characters
Pointers
Pass by Reference
File Input & Command Line Arguments
Dynamic Memory Allocation
100

This character marks the end of every C string.

null terminator (\0)

100

This operator returns the address of a variable.

ampersand (&)

100

In C, you simulate “pass by reference” by passing this instead of the variable itself.

the variable address via pointer

100

This parameter of main() contains the number of command-line arguments.

argc (argument count)

100

This function allocates uninitialized memory on the heap.

malloc()

200

This standard library function returns the number of characters in a string not including the terminator.

strlen()

200

This operator accesses the value stored at a pointer’s address.

dereference (*)

200

A function can modify a caller’s variable only if the function receives this.

a pointer to that variable

200

This main() parameter is an array of strings containing the command-line arguments.

argv (argument vector)

200

This function allocates memory and initializes it to all zeros.

calloc()

300

This input function reads a whole line of text, including spaces.

fgets()

300

When you assign a pointer to another pointer, they both store same...

memory address

300

This operator is used inside a function to access or change the caller’s original variable through its pointer.

dereference operator (*)

300

This function is used to open a file and returns a FILE*.

fopen()

300

This occurs when you lose all pointers to allocated memory without freeing it.

a memory leak

400

This string-handling problem occurs when you forget to leave space for the null terminator when declaring or copying a string.

buffer overflow

400

A pointer should never be dereferenced if it is initialized to this.

NULL

400

You should do this to a pointer parameter before using it to avoid undefined behavior.

ensure it points to a valid memeory address

400

This mode is used with fopen() to create or overwrite a file.

"w" (write mode)
400

This function must be called once for every block of memory allocated with malloc or calloc.

free()

500

This function writes formatted text into a file.

fprintf()

500

When passing an array to a function using pointers, you are passing this instead of a copy of the array

the address of the array (via pointer)

500

When passing an array to a function, this is why you do not need the ampersand operator.

the array name acts as a pointer to it's first element

500

This function closes a previously opened file.

fclose()

500

Memory allocated with malloc or calloc is stored here

the heap