CMSC 212: Introduction to Low-Level Programming Concepts
NOTE: In order to take this exam, a student must first pass the CMSC132 exam. Passing the 212 exam only places you out of CMSC212. Students taking this exam should have credit for Calculus I, II and Discrete Structures (MATH140, MATH141, and CMSC250).

  • All of the CMSC 132 topics above
  • Pointers and memory management
  • I/O
  • Libraries and linking
  • Program measurement
  • Primitive data representation
  • Array representation
  • Implementation of object-oriented concepts
  • Multi-language support

Summary of Topics from CMSC 212 (as complete as possible, but assume there could be things on the exam that are not on this list)

  • Low-Level Programming

    • definition
    • motivation
  • Compilation Stages
    preprocessor/translation/linking

    • preprocessor directives
    • type checking
    • connecting .o files
  • Java/C comparisons

    • assumes you know what you are doing - allows you to do almost anything
    • small tools
    • memory management
    • type definitions (conversions)
    • executable vs byte code
  • Assembly Language and Machine Levels

    • What is a program
    • Format: opcodes, registers, memory addresses
  • Memory / Storage

    • stack and heap
    • how they are each managed
      heap - header in the heap space to tell you the size of the chunk allocated

    • stack - dedicated registers to track location on stack
    • number representations: binary, octal, hex, 2’s complement
    • floating point number representation: mantissa, exponent, normalization
    • arithmetic in these representations
    • arrays - comparisons to other languages: Fortran90, Java and C
  • Makefile

    • dependencies and their structure
    • targets/ prerequisites/directives
  • Garbage Collection

    • memory leaks
    • concept and challenges of garbage collection
  • imitation of Java in C
  • reachability graph
  • Dynamic Data structures

    • singly linked lists
    • doubly linked lists
    • binary trees
    • binary search trees
    • Hash Tables (simple and chained)
    • Graphs
      general
      undirected and directed graphs
      DAGs (directed acyclical graphs)
  • Libraries

    • standard C libraries
    • user defined libraries
      statically linked
      dynamically linked
  • Callback functions

    • recursion
    • function pointers
  • Multiprocess issues
  • Sockets
  • UNIX: ps, PID, jobs, kill
  • Program Testing

    • White Box
    • Black Box
    • line coverage - lcov
  • Program Efficiency

    • Analysis - gprof
    • Optimization: human and compiler driven
      code motion
      loop unrolling
      dead-code elimination
  • Interface to code written in other languages

    • concept and considerations
  • JNI (Java Native Interface)

    • variable sharing considerations
    • calling C functions from Java
    • calling Java functions from C
    • parameter passing
  • UNIX

    • general user commands
    • directory structure
    • environment variables
    • command line arguments
  • C language

    • design goals
    • differences from Java
    • functions and parameter passing
    • variable scope and duration rules
    • arrays: using index and using pointers to access
  • struct, union and typedef

    • bit fields and bit operations (shift & comparisons)
  • types: promotion between types, the C definitions and casting
  • operators: type conversions and precedence
  • standard I/O library functions
  • strings and the standard string library functions
  • pipe, fork
  • select, socket and file descriptor management
  • pointers
  • as function parameters
  • the use of * and &
  • arrays of pointers
  • to named variables or to dynamically allocated space
  • NULL pointers
  • void pointers
  • casting pointers
  • pointer aliases
  • malloc, calloc, alloca and free
  • function pointers