A requirement that data elements begin at certain boundaries in memory. For example, given an 8-bit alignment requirement, a struct holding a 1-bit char
followed by an 8-bit int
might need 7 bits of padding after the char
so that the int
starts on an 8-bit boundary.
American Standard Code for Information Interchange. A standard mapping from the naïve English character set to the numbers 0–127. Tip: on many systems, man ascii
will print the table of codes.
For an automatically allocated variable, its space in memory is allocated by the system at the point of the variable’s declaration, then removed at the end of the given scope.
A set of programs from GNU that simplify automatic compilation on any system, including Autoconf, Automake, and Libtool.
Leading digits in a wide range of data sets tend to have a log-like distribution: 1 has about 30% frequency, 2 about 17.5%, … 9 about 4.5%.
True/false. Named after George Boole, an English mathematician living in the early-to-mid 1800s.
A function (A) that is sent as an input to another function (B) so that function B can call function A over the course of its operation. For example, generalized sort functions typically take as input a function to compare two elements.
A box-and-arrow diagram showing which functions call and are called by which other functions.
The study of whales.
Formally, the program that converts the (human-readable) text of a program into (human-illegible) machine instructions. Often used to refer to the preprocessor + compiler + linker.
A program for interactive execution of a compiled program, allowing users to pause the program, check and modify variable values, et cetera. Often useful for understanding bugs.
A copy of a structure containing pointers, which follows all pointers and makes copies of the pointed-to data.
The means by which human-language characters are converted into numeric codes for processing by the computer. See also ASCII, multibyte encoding, and wide-character encoding.
A variable present in the environment of a program, set by the parent program (typically the shell).
A representation of a number akin to scientific notation, like 2.3×10^4
, with an exponent part (in this example, 4) and a mantissa (here, 2.3). After writing down the mantissa, think of the exponent allowing the decimal point to float to its correct position.
The space in the stack in which function information (such as inputs and automatic variables) is stored.
GNU debugger.
A variable is global when its scope is the entire program. C doesn’t really have global scope, but if a variable is in a header that can reasonably be expected to be included in every code file in a program, then it is reasonable to call it a global variable.
Gnu’s Not Unix.
GNU Scientific Library.
The space of memory from which manually allocated memory is taken. Compare with the stack.
Integrated development environment. Typically a program with a graphical interface based around a text editor, with facilities for compilation, debugging, and other programmer-friendly features.
A test that executes a sequence of steps that involve several segments of a code base (each of which should have its own unit test).
Basically, a program that has no main
function, and is therefore a set of functions, typedefs, and variables available for use by other programs.
The program that joins together disparate portions of a program (such as separate object files and libraries) and thus reconciles references to external-to-one-object-file functions or variables.
Technically, an operating system kernel, but generally used to refer to a full suite of BSD/GNU/Internet Systems Consortium/Linux/Xorg/… utilities bundled as a unified package.
A (typically) short blob of text for which a (typically) longer blob is substituted.
Allocation of a variable on the heap at the programmer’s request, using malloc
or calloc
, and freed at the user’s request via free
.
An encoding of text that uses a variable number of char
s to represent a single human-language character. Contrast with wide-character encoding.
Short for mutual exclusion, a structure that can be used to ensure that only one thread is using a resource at a time.
Not-a-Number. The IEEE 754 (floating-point) standard defines this as the outcome of mathematical impossibilities like 0/0 or log(-1). Often used as a flag for missing or bad data.
A data structure and the associated functions that act on the data structure. Ideally, the object encapsulates a concept, providing a limited set of entry points for other code to interact with the object.
A file containing machine-readable instructions. Typically the result of running a compiler on a source code file.
A pointer to data in a format that can’t be read by the function handling the pointer, but that can be passed on to other functions that can read the data. A function in a scripting language might call one C function that returns an opaque pointer to C-side data, and then a later function in the scripting language would use that pointer to act on the same C-side data.
The Portable Operating System Interface. An IEEE standard to which UNIX-like operating systems conform, describing a set of C functions, the shell, and some basic utilities.
Conceptually, a program that runs just before the compiler, executing directives such as #include
and #define
. In practice, typically a part of the compiler.
A running program.
A program that reports where your program is spending its time, so you know where to focus your efforts at speedup.
POSIX thread. A thread generated using the C threading interface defined in the POSIX standard.
Random number generator, where random basically means that one can reasonably expect that a sequence of random numbers is not systematically related to any other sequence.
Read the manual.
The claim that the language we speak determines the thoughts we are capable of having. Its weakest form, that we often think in words, is obvious; its strongest form, that we are incapable of thoughts that our language lacks words or constructions for, is clearly false.
The portion of the code base over which a variable is declared and accessible. Good coding style depends on keeping the scope of variables small.
Touching an incorrect segment of memory. Causes the operating system to halt the program immediately, and so often used metonymically to refer to any program-halting error.
Secure Hash Algorithm.
A program that allows users to interact with an operating system, either at a command line or via scripts.
Structured Query Language. A standardized means of interacting with databases.
The space in memory where function execution occurs. Notably, automatic variables are placed here. Each function gets a frame, and every time a subfunction is called, its frame is conceptually stacked on top of the calling function’s frame.
The method by which variables with file scope and variables inside functions declared as static
are allocated. Allocation occurs before the program starts, and the variable continues to exist until the end of the program.
A system for running a sequence of unit tests and integration tests. Provides easy setup and teardown of auxiliary structures, and allows for checking of failures that may (correctly) halt the main program.
A sequence of instructions that a computer executes independently of any other thread.
A set of characters to be treated as a semantic unit, such as a variable name, a keyword, or an operator like *
or +
. The first step in parsing text is to break it down into tokens; strtok_r
and strtok_n
are designed for this.
Casting a variable of one type to a second type, thus forcing the compiler to treat the variable as data of the second type. For example, given struct {int a; char *b:} astruct
, then (int) astruct
is an integer (but for a safer alternative, see “C, with fewer seams”). Frequently not portable; always bad form.
A descriptor of how the compiler may handle a variable. Is unrelated to the type of the variable (int
, float
, et cetera). C’s only type qualifiers are const
, restrict
, volatile
, and _Atomic
.
A single block of memory that can be interpreted as one of several types.
A block of code to test a small piece of a code base. Compare with integration test.
User interface. For a C library, this includes the typedefs, macro definitions, and function declarations that users are expected to be comfortable with when using the library.
Unicode Transformation Format.
A function that takes in a variable number of inputs (e.g., printf
).
An encoding of text where each human-language character is given a fixed number of char
s. For example, UTF-32 guarantees that each Unicode character is expressed in exactly 4 bytes. Contrast this definition with multibyte encoding.
Extensible Markup Language.
3.138.122.11