C Programming Part 3

  1. Stack and Heap
    Memory areas for temporary and dynamic storage. Examples: Local Variables for stack and malloc() for heap
  2. Attribute
    Specifiers to tell compiler to treat certain entities in a special way. Example: __attribute__((packed))
  3. Assembly Code
    Low-level code generated by the compiler, specific to machine architecture and different CPUs have different assembly languages. Example: asm
  4. Linker
    A tool that combined object files into an executable. Example: ld (GNU Linker)
  5. Undefined Behavior
    Code whose behavior is unpredictable, leading to bugs. Examples: Accessing array out-of-bounds, dereferencing null pointers
  6. Modifiers
    Keywords that alter the properties of basic data types. Examples: short, long, and unsigned
  7. Ternary Operator
    Operator that evaluates a condition and returns one of two values. Example: condition ? value_if_true : value_if_false
  8. Memory Leak
    Unreleased memory allocation leading to wasted resources. Example: Allocating memory with malloc() and not freeing it with free()
  9. Variadic Functions
    Functions that accept a variable number of arguments. Examples: printf(), scanf(), va_start, and va_end
  10. Register Variable
    Suggests storage in a CPU register for quick access. Example: register int speed;
  11. Union vs. Structure
    Union shares memory among members, structure allocates separate memory. Examples: union Data { int i; float f; }; struct Point { int x; int y; };
  12. Token
    Smallest Unit in source code identified by the compiler. Examples: keywords, identifiers, literals, and operators
  13. Lvalue and Rvalue
    Lvalue represents memory location, Rvalue represents data value. Example: int x = 5; x is an Lvalue and 5 is an Rvalue
  14. Deadlock (not in book)
    Situation where processes wait for each other halting execution. Example: Two threads waiting indefinitely for a resource locked by the other
  15. Signal Handling
    Mechanism to handle runtime anomalies. Examples: signal(), SIGINT, and SIGSEGV
  16. Mutex (not in book)
    Mutual exclusion object ensuring only one thread accesses shared resources. Examples: pthread_mutex_t, pthread_mutex_lock(), and pthread_mutex_unlock()
  17. Buffer Overflow
    Overrunning a buffer's boundary, causing memory corruption. Example: Writing more data in an array than it can hold
  18. Semaphore (not in book)
    Synchronization primitive used to control access to a common resource. Examples: sem_init(), sem_wait, and sem_post()
  19. Compiler Flags
    Options used during compilation to affect output. Examples: -02 (optimization) -g (debugging) and -Wall (warnings)
  20. Conditional Compilation
    Including or excluding code based on preprocessor directives. Examples: #ifdef, #ifndef, #elif
Author
Studymode189
ID
364343
Card Set
C Programming Part 3
Description
Updated