Advanced C

Accelerated Technical Training for C Language Programmers

Format

  • Five days
  • Emphasis on practical skills.
  • Hands-on.

Audience

This course is for C programmers who need to deepen their skills and grasp of this powerful, industry-standard language. Versions are available for both the Unix and PC environments.

Schedule

The course consists of eight case studies to be covered in five days. This goal is ambitious but attainable.

Prerequisites

To take this course, you must have:
  • Familiarity with the basic constructs of the C language and some experience in using it
  • Familiarity with the Unix or PC environment:
    • able to edit files (any editor is ok)
    • able to navigate the filesystem

Objectives

The primary objective of this course is to convey the techniques for using the UNIX system calls and library subroutines.

You take away with you some programs that you will find useful as examples for solution of related problems. You get source code files to keep.

Finally, after reading lots of good code, you are likely to write good code.

In this course, you:

  1. Acquire habits of good programming practice by reading and writing structured, well-documented code.
  2. Add some goodies to your professional bag of tricks.
  3. Practice using some of C's more challenging constructs such as pointer arrays, function pointers, longjumps, C preprocessor macros, and more.
  4. Observe and practice the use of programming tools including, of course, the compiler, and others such as the C preprocessor, make, and ar which increase your productivity.
  5. Acquire expertise in the use of a substantial portion of the Section 2 UNIX system calls and the Section 3 library calls with particular attention devoted to:
    • process control, including fork() and exec()
    • process management, incl. signal() and chdir()
    • low-level i/o, incl. open(), read(), pipe()
    • buffered i/o, incl. printf() and putchar()
    • process gets and sets, incl. setuid()
    • things to get from UNIX, incl. getenv() and getpass()
    • conversions, incl. atoi() and tolower()
    • string routines, incl. strcmp() and strlen()
    • stack management, incl. setjmp() and longjmp()
    • curses, incl. initscr(), refresh(), mvcur()

Method

Learning is not a passive process but an active one. Programming is rarely learned by reading about it. It is not a theoretical skill but a practical one. Hence, the method of this course is to read not books and manuals but real code.

In the daily work of programmers, programs are rarely developed from scratch. Rather, new solutions are based on earlier ones. When writing code, it is not plagiarism to borrow from other works. Productive programmers have extensive repertories of programs they can re-use. A good repertory is a valuable resource. The programs presented in this course will become part of your own repertory and will enhance your productivity back on the job.

The course consists of eight case studies. Each is a solution to a generic problem encountered by working C programmers. Each includes:

  • Conceptual overview
  • Documentation of the case study in the format of UNIX "man" pages
  • Source code to compile, execute, and view on the overhead projector
  • Line-by-line description of what's happening in the source code and the thinking behind it
  • Exercises
  • Solutions

Contents

Day 1
  • Housekeeping
  • Practice using:
    • C preprocessor
    • C compiler
    • linker
    • libraries
    • ar (archiver)
    • make (automated builder)
Day 2
  • Case study: a data editor
  • Case study: extending the data editor
Day 3
  • Case study: a shell
  • Case study: extending the shell
Day 4
  • Case study: buffered i/o
  • Case study: variable-length argument lists
Day 5
  • Case study: recursion
  • Review and summary

Classroom Setup

Delivery of this course requires a classroom equipped with:
  • an overhead projector
  • a PC or workstation for each student
  • a PC or workstation for the instructor
  • workbook repro

Site

The course can be taught in your classroom, anywhere in the world. Travel outside the San Francisco Bay Area requires reimbursement of the instructor's travel expense.

Copyright © 2020

Dan Keller Technical Services
2248 International Blvd., Oakland
California, USA 94606
tel: 415 / 861-4500