Conventions used
Introduction to C
Metrowerks CodeWarrior
Lesson 1   Lesson 5
Lesson 2   Lesson 6
Lesson 3   Lesson 7
Lesson 4   Lesson 8
Midterm Study Guide   Midterm
Final Study Guide   Final Examine
Other Stuff
C on the Mac

Lesson 1.

PART 1.

C Language History.
How to create a C program.
Compilers and Interpreters.
C Compilers.
Why C?
Getting Started
General C program structure.
Language comparisons.
Anatomy of a simple C program.
C keywords.
C keywords and identifiers.
All about variables.
Making function calls.
Important symbols in C.
Summary.

PART 2.

Type specifiers.
Integers and characters.
Void, Short and Long.
Float and Double.
Summary of data types and sizes.
Simple operators.
Variable assignment operators.
More on functions.
Function declarations and definition.
ANSI vs. K&R function declarations.
Function declarations before main().
Function declarations after main().
Function and operator example.
Operators.
Other type specifiers.
Using printf().
Arrays.
Multi-demensional arrays.
Strings.
Strings and using strcpy().
Other useful string funcions.
Using gets() to input text.
Using gets() to input numbers.
Using scanf(), sscanf() and sprintf().

PART 3.

Conditional expressions.
if conditional statement.
if ... else statement.
Loops.
for loops.
while loops.
do ... while loops.
break statement.
continue statement.
switch statement.


Lesson 2 consists of 14 programs:

Assignment 1, Compute total of integers from user input

Assignment 2, Compute factorial from user input

Assignment 3, Compare two strings from user input

Assignment 4, Count: from, to, increment from user input

Assignment 5, Compute total of integers from user input using an array

Assignment 6, Compute fibonacci from user input

Assignment 7, Sort an array of integers (more than 3)

Assignment 8, Reverse the string input by the user

Assignment 9, Convert string to upper case from user input

Assignment 10, Convert dollar amount (.00 to .99) to minimum (USA) coins needed

Assignment 11, Compute number of constants and vowels in a given word

Assignment 12, Convert integer number to a text number

Assignment 13, Sort an array of strings from user input

Assignment 14, Given a number sum the digits from user input

Quiz 2


Lesson 3 consists of 8 programs:

Assignment 1, Given a number multiply by two, print the result and the string version of the result

Assignment 2, Given "10/14/93," output "October 14, 1993."

Assignment 3, Compute fibonacci from user input using recursion

Assignment 4, Count the number of consonants, vowels, and words in a sentence

Assignment 5, Convert floating point number to a correct text number

Assignment 6, Test delete, shift right, shift left

Assignment 7, Compute number of days between two calendar dates

Assignment 8, ROT13 encryption/decryption program

Quiz 3


Lesson 4 consists of 8 programs:

Assignment 1, Printout the reverse of the string input by the user using recursion

Assignment 2, Compare to strings from user input using function, case insensitive

Assignment 3, Create macro definition MAX, i.e. MAX(1,3) is 3

Assignment 4, Create macro definition SWAP, i.e. X=1, Y=3, SWAP(X,Y) sets X=3, Y=1

Assignment 5, Preprocessor fault

Assignment 6, Add tax to a given dollar amount

Assignment 7, Search for sub-string within another string

Assignment 8, Sort an array of names (last, first) from user input and track entry errors

Quiz 4


Midterm Study Guide consists of 3 problems:

Problem 1, Macro NEG(x).

Problem 2, C Preprocessor.

Problem 3, DO WHILE and WHILE.


The midterm consists of 7 problems:


Lesson 5 consists of 12 programs:

Assignment 1, Create string and line data types

Assignment 2, Create structures for an address book.

Assignment 3, Create structures for an employee database.

Assignment 4, Sort an array of integers (more than 3) in reverse order

Assignment 5, Sort structures by field in reverse order.

Assignment 6, Questions.

Assignment 7, Enter line data compute slope and distance

Assignment 8, Write macro to find the minimum of 4 values from user input

Assignment 9, Enter object data (circle, triangle, rectangle), compute area.

Assignment 10, List or sort employee database (Last name, SSN or Salary).

Assignment 11, List or sort book database (Last name, Title or Year of publication).

Assignment 12, Display dec, bin, oct, hex and ascii from user given range

Quiz 5


Lesson 6 consists of 10 programs:

Assignment 1, Question.

Assignment 2, Compare two strings from user input using function with pointers, case insensitive

Assignment 3, Search for sub-string within another string using pointers

Assignment 4, Pointer manipulation.

Assignment 5, Create a string dynamicly.

Assignment 6, Test pointers.

Assignment 7, Convert Fahrenheit to Celsius using pointers

Assignment 8, Create a string dynamicly using a function

Assignment 9, Write an inplace string reverse function.

Assignment 10, Rock, Paper, Scissors game.

Quiz 6


Lesson 7 consists of 8 programs:

Assignment 1, Pointer questions.

Assignment 2, Read and display text file, skip lines with #'s.

Assignment 3, Write command-line string to file and read it back.

Assignment 4, Multiple file Assignment that inverts a string's case.

Assignment 5, Write command-line calculator, result to file, print file.

Assignment 6, Find number of occurrences of character in file.

Assignment 7, Write random characters to a file include a given character a given number of times.

Assignment 8, Access an array 3 ways; a[ ][ ], *a[ ] and **a.

Quiz 7


Lesson 8 consists of 1 program:

Assignment 1, Create, read or display a text file.

Quiz 8


Final Study Guide consists of 8 problems:

Problem 1, Character definitions.

Problem 2, String definitions.

Problem 3, Variable Scope.

Problem 4, Macros.

Problem 5, Strings.

Problem 6, Files (program).

Problem 7, Pointer Arithmethic.

Problem 8, Files (questions).


Final Examine consists of 9 problems.


Other Stuff consists of 3 files.


Author: David Bishop

Last updated: Oct 20, 1998

Home