TopicsVariable declarations and definitionsPrinceton University COS 217: Introduction to Programming Systems Spring 2006 Midterm Exam Preparation Topics You are responsible for all material covered in lectures, precepts, assignments, and required readings. This is a non-exhaustive list of topics that were covered: C programming The program preparation process Memory layout: text, stack, heap, rodata, data, bss sections Data types Variable declarations and definitions Variable scope, linkage, and duration/extent Variables vs. values Operators Statements Function declarations and definitions Pointers Call-by-value and call-by-reference Arrays Strings Command-line arguments Constants: #define, enumerations, the "const" keyword Input/output functions Text files Structures Dynamic memory management: malloc(), calloc(), realloc(), free() Void pointers Function pointers and function callbacks Macros and their dangers The assert() macro Bitwise operators Programming style Modularity, interfaces, implementations Programming by contract Multi-file programs using header files Protecting header files against accidental multiple inclusion Opaque pointers Abstract data types Memory "ownership" Testing Page 1 of 2Number Systems The binary, octal, and hexadecimal number systems Signed-magnitude, one's complement, and two's complement representation of negative integers Applications Run-length compression, lexical analysis via finite state automata String manipulation Symbol tables, linked lists, hash tables Dynamically expanding arrays XOR encryption Tools: The UNIX/GNU programming environment UNIX, bash, xemacs, gcc, gdb Readings As specified by the course "Schedule" web page... Required: C Programming (King): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.1-3, 16.5, 17, 18, 19.1-3, 20, 21, 22, 24.1 The Practice of Programming (Kernighan & Pike): 1, 2, 4, 5, 6 Recommended: Programming with GNU Software (Loukides & Oram): 1, 2, 3, 4, 6 Copyright © 2006 by Robert M. Dondero, Jr. Page 2 of
View Full Document