CS262 Fall 2011: Introduction to Low-level Programming (Sessions 2&5)



  • Jyh-Ming Lien
  • jmlien@cs.gmu.edu
  • Office: ENGR 4442
  • Office hours: Monday 4-6pm

Course Scope

Most high-level programming languages (and particularly Java) insulate the programmer from the realities of the hardware on which the programs will run. C is the exception since it was originally designed to implement the Unix operating system. C offers the programmer direct access to much of the underlying hardware and, for programs running under Unix, direct access to operating system services. For these reasons C remains the language of choice for systems programming. This is a (short) course on "low-level" programming using C. We will learn C with heavy emphasis on pointer operations.

Course Outcomes

The students will:

  1. Be able to implement, test and debug a designed solution to a problem in a low-level programming language, specifically the C programming language.
  2. Demonstrate a good understanding of C language constructs such as pointers, dynamic memory management, and address arithmetic.
  3. Demonstrate a good understanding of C libraries for input and output, and the interface between C programs and the UNIX operating system.
  4. Demonstrate an ability to use UNIX tools for program development and debugging.


  • C or better in CS 211 or CS 222

Required Textbook

  • Brian Kernighan and Dennis Ritchie, The C Programming Language, 2nd ed., Prentice Hall, 1988


  1. Programming Assignments 30% (There will be two to three programming assignments.)
  2. Midterm and Final Exams 60% (Dates will be posted)
  3. Quizzes 10% (Pop quizzes)

List of Topics (tentative)

  • C Types, Operators, and Expressions
  • Control Flow
  • Functions and Program Structures
  • Pointers and Arrays
  • Dynamic memory allocation
  • Structures
  • Bitwise operations
  • Input and Output Libraries
  • The Unix System Interface


All required assignments should be completed by the stated due date and time. The total score of your assignment score will be 10 points less every extra day after the due date (i.e., the 100 total points will become zero after 10 days pass the due date). You are responsible for keeping backups of your work ("my disk crashed" and "my roommate ate my program" are not reasons for late submissions). You can only turn in a program once. No revisions or additions can be made to your program after it has been submitted.

Please note that all coursework is to be done independently. You are encouraged to discuss the material BEFORE you do the assignment. As a part of the interaction you can discuss a meaning of the question or possible ways of approaching the solution. The homework should be written strictly by yourself. In case your solution is based on the important idea of someone else please acknowledge that in your solution, to avoid any accusations. Plagiarizing the homework will be penalized by maximum negative credit and cheating on the exam will earn you an F in the course. See the GMU Honor Code System and Policies at this page and this page. You are bound by these honor codes. Any submitted work which shows too much commonality with others' work to be completely original, or any plagiarized work, will receive a grade of 0. Any code which is presented in class or provided to you as part of the project may be included in your programs.