CS 240: Programming in C - Department of Computer Science - Purdue University Skip to main content

CS 240: Programming in C

Prerequisite: CS 18000 (Problem Solving and Object-Oriented Programming)

Detailed Syllabus

  1. UNIX command environment, the basic C development cycle

  2. 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

  3. Operators -- arithmetic, relational, logical, increment, and decrement, assignment operators and expressions, precedence and associativity bitwise operators, control flow

  4. Program structure, functions, prototypes, implicit declarations and implications, null declarations, pass by value scope rules, header files, types of variables, block structure, #include

  5. Recursion, macros and C preprocessor

  6. Pointers and addresses, dereferencing, pointers vs. arrays, address arithmetic, pointers and function arguments, big vs. small endian integer representation, data alignment

  7. Dynamic memory allocation, malloc, free, pointer arrays, pointers to pointers, arrays of pointers, command line arguments, pointers to functions

  8. Structures, dot operator, pointers to structures, -> operator, arrays of structures, selfreferential structures, filler bytes in structures

  9. Unions, typedef, bit-fields

  10. Pointer/structure applications -- linked lists, stacks, binary trees, bubble sort

  11. UNIX file abstraction, streams and file pointers, standard input and output, formatted output, formatted input, scanf

  12. Basic structure of a concurrent client/server program involving fork() and exec()

  13. File access, fopen, getc, putc, fclose, fprintf, fscanf, fseek, feof, ferror, EOF, line input and output

  14. 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

Last Updated: Apr 25, 2017 4:41 PM

Department of Computer Science, 305 N. University Street, West Lafayette, IN 47907

Phone: (765) 494-6010 • Fax: (765) 494-0739

Copyright © 2024 Purdue University | An equal access/equal opportunity university | Copyright Complaints

Trouble with this page? Disability-related accessibility issue? Please contact the College of Science.