1/33
Vocabulary and terminology flashcards covering UNIX fundamentals, C memory management, build automation with Makefiles, and version control with Git based on 1XC3 review lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
UNIX Philosophy
A design style for software tools that emphasizes writing small programs that do one thing well, work together via pipes, and prefer text streams for easy inspection and redirection.
PATH
An environment variable containing a list of directories that the shell searches to find executable commands.
Standard Streams
The three default communication channels for a program: stdin (input), stdout (normal output), and stderr (error output).
Redirection (>)
A shell operation that sends the stdout of a command to a file, overwriting the file's contents.
Pipes (|)
A mechanism that connects the stdout of the command on the left to the stdin of the command on the right.
Everything Is a File
A defining UNIX concept where resources such as regular files, directories, devices, pipes, and sockets are accessed via a common file-like interface (open, read, write, close).
/dev/null
A special file on UNIX systems that acts as a sink; any data written to it is discarded.
Inode
A data structure that stores metadata about a file; directories specifically store mappings from filenames to these structures.
chmod 754
A command where permissions are set to: 7 (rwx) for the owner, 5 (r-x) for the group, and 4 (r--) for others.
Globbing
Filename expansion performed by the shell before a command runs, using characters like ∗ (all files), ? (one character), or [ab] (specific characters).
Job Control
The ability to manage multiple running or suspended commands (jobs) using shell commands like jobs, fg, bg, and kill.
Function Prototype
A declaration of a function that tells the compiler the return type and parameter types before the actual function call occurs.
Uninitialized Local Variables
Variables in C that are not automatically set to zero and instead contain indeterminate values from old bits in stack memory.
Stack
A memory region used to store local variables and function call frames during program execution.
Heap
A memory region used for dynamically allocated memory using functions like malloc or calloc.
Pointers
Variables that store memory addresses; the & operator gets an address and the ∗ operator dereferences an address to access the value.
Pass by Value
The default C behavior where a function receives a copy of an argument, meaning changes to the local copy do not affect the original variable in the caller.
Little-endian
A machine architecture where the bytes of a multi-byte value (like an int) are stored in memory with the least significant byte first.
malloc
An allocation function that provides memory on the heap; if it fails, it returns NULL.
Null-terminated string
A character array in C that ends with the null byte ’\0’ to signal the end of the string.
Buffer Overflow
A condition occurring when a program copies more data into a fixed-size array than it can hold, leading to crashes or data corruption.
strncpy
A bounded string function that copies up to n characters; however, if the source has length at least n, the result may not be null-terminated.
argc
An integer argument in main that counts the number of command-line arguments, including the program name itself.
strtol
A function used to convert string-based command-line arguments into long integers for arithmetic use.
Arrow Operator (->)
The member access operator used when you have a pointer to a struct, as opposed to the dot operator used for struct objects.
Makefile Target
The output file or goal to be built, followed by its prerequisites and the shell commands (actions) needed to create it.
$@
An automatic variable in Makefiles that represents the name of the current target.
$<
An automatic variable in Makefiles that represents the first prerequisite of the rule.
$^
An automatic variable in Makefiles that represents all the prerequisites of the rule.
Compiler Optimization Flags
Command-line flags ranging from -O0 (no optimization) to -O3 (aggressive) or -Ofast (most aggressive, may ignore strict standards).
CLOCKS_PER_SEC
A constant used to convert the difference between two clock_t values from clock() into seconds for benchmarking.
git status
A Git command used to check which files have changed and which files are currently staged for the next commit.
git commit
A command that records a snapshot of the staged changes into the local repository's history.
Branch
A Git feature that lets a developer move away from the main line of work to experiment or add features without destabilizing the main code.