- Future Students
- Academic Progams
- Undergraduate Program
- Current Semester CS Courses
- New Course Offerings
- Upcoming Semesters
- Previous Semesters
- Canonical Syllabi
- Course Access & Request Policy
- Academic Integrity Policy
- Grad Student Registration
- Variable Title Courses
- Study Abroad
- Professional Practice
- Co-Op Professional Practice
- Non-Co-Op Professional Practice
- ISS Application Process for International Students (CPT, OPT, RCL, Program Extension, COEL)
- Pass/Not Pass Spring 2020
CS 240: Programming in C
Prerequisite: CS 18000 (Problem Solving and Object-Oriented Programming)
Detailed Syllabus
-
UNIX command environment, the basic C development cycle
-
Data representation issues that are visible to C programmers, data types, sizes, and limits, integer and floating point number representation, constants, variables, and declarations, sizeof, printf and formatted output, type conversion, sign extension
-
Operators -- arithmetic, relational, logical, increment, and decrement, assignment operators and expressions, precedence and associativity bitwise operators, control flow
-
Program structure, functions, prototypes, implicit declarations and implications, null declarations, pass by value scope rules, header files, types of variables, block structure, #include
-
Recursion, macros and C preprocessor
-
Pointers and addresses, dereferencing, pointers vs. arrays, address arithmetic, pointers and function arguments, big vs. small endian integer representation, data alignment
-
Dynamic memory allocation, malloc, free, pointer arrays, pointers to pointers, arrays of pointers, command line arguments, pointers to functions
-
Structures, dot operator, pointers to structures, -> operator, arrays of structures, selfreferential structures, filler bytes in structures
-
Unions, typedef, bit-fields
-
Pointer/structure applications -- linked lists, stacks, binary trees, bubble sort
-
UNIX file abstraction, streams and file pointers, standard input and output, formatted output, formatted input, scanf
-
Basic structure of a concurrent client/server program involving fork() and exec()
-
File access, fopen, getc, putc, fclose, fprintf, fscanf, fseek, feof, ferror, EOF, line input and output
-
Low-level I/O, file descriptors, standard descriptors, open, create, read, write, close, fdopen, fileno path names, absolute vs. relative path names, directories, current directories, getcwd, chdir