[Courses] [C] Beginner's Lessons: Map

KWMelvin kwmelvin at intrex.net
Wed Nov 6 00:30:21 EST 2002


Greetings,

The book: _Practical C Programming 1E_ by Steve Oualline.
This is a summary of what has been covered in the book so far:

K=keyword L=library O=operator M=misc

Use wget to grab Lessons 1-5:
$ wget -c http://us.geocities.com/k_w_melvin/C_1-5.tgz

(1) The Basics of Program Writing. 
    * Text Editor (vi, vim)
    * Compiler (gcc)
    * Utilities (make, debugger)
    * Hello World (sample program)

(2) Style
M   * /* Comments */
    * Common Coding Practices
    * Indentation
    * Clarity & Simplicity
 
(3) Basic Declarations and Expressions
M   * Basic Program Structure  main(){ return 0; }
O   * Simple Operators: * / + - %
    * Variable naming
M   * Variable declarations: type var_name; /* comment */
K1  * Integer type: int
M   * Variable Assignment: var_name = expression;
L   * printf() <stdio.h>
K2  * Floating point type: float
K3  * Character type: char
    * Special characters: \b \f \n \r \t \' \" \\ \nnn

(4) Arrays, Qualifiers, and Reading Numbers
M   * Arrays: type array_name[num_elements];
    * Strings: strcpy(array_name, "Bob");
L   * String functions (<string.h>): strcpy(), strcat(), strlen(), strcmp()
L   * Reading strings: fgets()
    * Multiple dimension arrays: matrix[1][2];
L   * Reading numbers: sscanf()
    * Initializing variables
K4-7  * Types of integers: long, short, signed, unsigned
M   * Integer printf/sscanf conversions: %h %d %ld %H %u %lu
K8-10 * Types of floats: float, double, long double
M   * Float printf/sscanf conversions: %f %lf %L
O   * Shortcut operators: += -= *= /= %=
    * Side effects
 
(5) Decision and Control Statements
K11 * if 
K12 * else 
K13 * while
K14 * break
K15 * continue

Use wget to grab Lesson 6:
$ wget -c http://us.geocities.com/k_w_melvin/C_6.tgz

(6) The Programming Process
    * Setting Up
    * The Specification
    * Code Design
    * Testing
    * Debugging
    * Maintenance
    * Revisions
    * Electronic Archaeology

Use wget to grab Lesson 7:
$ wget -c http://us.geocities.com/k_w_melvin/C_7.tgz

(7) More Control Statements
K16 * for
K17 * switch, break, continue

(We've been introduced to 17/32 of the C keywords so far!)

Use tar to extract the lessons from the tarballs:
$ tar -xzvf *tgz

That is what has been covered so far. Is everyone with us?
If so, where are your answers to the exercises? 8^D Show us
your source! Ask questions. Contribute insights, help us!
Participate.

Here is what is coming up for future lessons:

 (8) Variable Scope and FUNCTIONS!
 (9) The C Preprocessor (#define #include #ifdef/#endif macros #pragma)
(10) Bit Operations ( & | ^ ~ << >> )
(11) Advanced Types (Structures, Unions, typedef, enum, and more)
(12) Simple Pointers (...and Arrays, ...and Structures, cmd-line args +)
     (We may have to spend some time here on Lesson 12)
(13) File Input/Output
(14) Debugging and Optimizing
(15) Floating Point
(16) Advanced Pointers (So, whatever happened to Intermediate Pointers?)
     (We may have to spend some time here on Lesson 16)
(17) Modular Programming
(18) Portability Problems
(19) C's Dustier Corners
(20) Putting it all together
(21) Programming Adages

At this point, we should know the C programming language well enough
to take an Intermediate C "course" where we hopefully will learn how
to do some useful things with C?  Maybe someone will be willing to
teach us how to work with tables, trees, lists, sorting, structures, 
memory, hashing, searching, strings, and so forth? 8^D  We'll need
a good explanation of the concepts, some interesting examples that
explain the concepts, and some exercises to test if we have grasped
the concepts.  Anyone?  Start preparing now... we'll be ready to
start before you know it!

Happy Programming!
--
K



More information about the Courses mailing list