Here is a page dedicated to basic UNIX commands and simple exercises to help you learn them.
pico - The editor for pine. I have the help file on line.
emacs - A better but more complicated editor. To get help once inside emacs type "ESC-x help-with-tutorial" to get a good tutorial. It does take quite a while though.
C Compiler
To compile the file source.c type : gcc source.c -o source
To compile a program that needs math.h then use : gcc -lm source.c -o source
Examples
Here I will try to keep a list of sample code from class
hello.c
ch3p1.c - Very basic (no inputs from keyboard) quadratic solver
ch3p2.c - Quadratic solver that takes input from keyboard but doesn't check for equations with no real roots.
quad.c - Quadratic solver that checks for no real roots.
quad2.c - Quadratic solver that checks for no real roots and only one real root.
complex.c - Quadratic solver that solves any quadratic even with complex roots.
means.c - Calculates means (uses if)
means2.c - Calculates means (uses switch)
ch5p1.c - simple use of loops
ch5p2.c - same, but input from keyboard
ch5p3.c - prints squares and cubes up to 20
ch5p4.c - prints a sin and cos table
ch5p5.c - computes average of 100 numbers
ch5p6.c - computes average of numbers (no limit)
ch5p7.c - computes average of even integers (continue)
ch5p8.c - computes the average of even integers (no continue)
ch5p9.c - determines if a number is prime
ch5p10.c - finds divisors of all numbers up to 100
ch5p11.c - looks for three digit numbers which are the sum of the cubes of their digits
ch6p1.c - Unusual for loop
ch6p2.c - Even stranger for loop
ch6p3.c - while loop
ch6p4.c - same without needing math.h
ch6p5.c - computes sine of an anglegetchar using
ch6p6.c - same without needing fabs
ch6p7.c - do-while loop
ch6p8.c - do-while loop used to look for termination of input
ch6p9.c - same but rejects invalid input
ch6p10.c - finds root of polynomial using bisection
ch6p11.c - finds root of polynomial using newton's method
ch7p1.c - Prints out all the ascii characters
ch7p2.c - Simple
ch7p3.c - average two numbers
ch7p4.c - means calculator
ch7p5.c - shift encoder
ch7p6.c - another means calculator
ch7p7.c - The last means calculator
ch7p8.c - Converts hex to dec and vice versa
ch7p9.c - Demonstrates having field width as a variable
ch7p10.c - Demonstrates having field width and precision as a variable
ch8p1.c - Demonstrates precision difference between float and double
ch8p2.c - Demonstrates "bottlenecking"
ch8p4.c - Calculates e using powers of 10
ch8p6.c - Calculates e using powers of 8
ch9p1.c - Computes mean and standard deviation of 5 numbers
ch9p2.c - Computes mean and whether each data item is above or below the mean
ch9p4.c - Sorts 5 numbers using selection sort
ch9p5.c - Sorts 5 numbers and computes median using insertion sort
ch9p6.c - Sieve of Erastothenes
ch9p7.c - Adds two 79 digit numbers
ch9p8.c - Computes length on inputted string
ch9p10.c - outputs length of an inputted string
ch9p11.c - Finds occurrences of a letter in a string
ch9p12.c - Adds two 79 digit numbers (cleaner)
ch9p13.c - Prints graph of a function
ch10p4.c - Treats array as pointer
ch10p5.c - prints a string as an array
ch10p6.c - prints a string using pointers
ch10p6a.c - prints a string using pointers
ch10p9.c - Dynamic memory allocation example
ch10p10.c - Dynamic memory allocation version of statistics program
ch11p1.c - function to compute log2
ch11p2.c - program to compute polar coords given rectangular ones
ch11p4.c - program to compute m choose n
ch11p5.c - program to find twin primes
ch11p6.c - program to square a number (demonstrates call by reference)
ch11p7.c - program to prime factor a number
ch11p8.c - program to sort an array (using functions and call by reference)
ch11p10.c - program to sort an array (demonstrates passing an array to a function)
ch11p11.c - program to square a number (uses global variable)
ch11p12.c - program to sort an array (demonstrates using global vars)
ch11p13.c - program to calculate mean, std dev, and median of a set of numbers
ch11p14.c - demonstrates non-static variable
ch11p14a.c - demonstrates static variable
ch12p2.c - Cramer's rule for 3x3
ch12p3.c - Matrix arithmetic
ch12p4.c - Computes number of paths on a graph
ch12p5.c - Create magic squares
ch12p6.c - Read in and sort words
ch12p7.c - Contour plot
ch13p3.c - Writes inputted words to a file
ch13p4.c - Prints file back to screen
ch13p5.c - Sorts file of words
ch13p6.c - Writes integers to a file
ch13p7.c - reads integers from file
ch13p8.c - creates a file of all primes ch13p9.c - finds primes up to 100000000
ch13p10.c - splits integers into files of evens and odds
ch13p11.c - reads in grades and creates text file
ch13p12.c - reads grades from file
ch13p13.c - represents records in a different way
ch13p14.c - prints out records in new format
ch13p15.c - even better file management scheme
ch13p16.c - gets length of record
ch13p17.c - writes records to screen
ch13p18.c - allows user to update records
ch14p1.c - Writes inputted records to a file
ch14p2.c - Prints file back to screen
ch14p3.c - Sorts records back to a file
ch14p4.c - Same as ch14p1 but with functions
ch14p5.c - Same as ch14p2 but with pointers
ch14p6.c - Same as ch14p1 with pointers
ch14p7.c - Prints info out on numbers
ch14p8.c - Example of union
ch15p1.c - Prints 100 random numbers to screen
ch15p2.c - Same thing using clock for seed
ch15p3.c - Returns 100 numbers between a and b
ch15p4.c - Flips coin 100 times
ch15p5.c - Rolls die 100 times
ch15p6.c - Slot machine
ch15p7.c - Deals poker hand
ch15p8.c - Deals poker hand making sure no cards repeat
ch15p9.c - Approximate sqrt(2)
ch15p10.c - Approximates pi
ch15p11.c - Random walk
ch15p12.c - maze runner
ch15p13.c - prints 100 numbers in normal distribution
ch15p14.c - finds scores for given percentile ranks on SAT
ch16p1.c - Prints out what quadrant a point is in
ch16p2.c - Tells whether a number is even
ch16p3.c - Finds how many ways a number can be written as sum of 2 numbers
ch16p4.c - Evaluates logical expression
ch16p5.c - Prints truth table for logical expression
ch17p1.c - Basic arithmetic on complex numbers
ch17p2.c - Same with header file
ch17p3.c - Find modulus, argument and square root of complex number
ch17p4.c - Same with header file
ch17p5.c - Solve any quadratic
ch17p6.c - Take cube roots
ch17p7.c - Solve cubics
ch17p8.c - Find nth roots of unity
fnptr.c - Function pointer program
macro.c - Program to demonstrates macro
file1.c - Program to deomnstrate calling a function with a different name
cat2.c - Concatenation program
ch18p1.c - Cuber written in C
ch18p2.cc - Cuber written in C++
ch18p3.cc - Complex numbers in C++
ch18p4.cc - Complex numbers and operator overloading
ch18p5.cc - Complex numbers (mod, arg, and sqrt), function overloading
ch18p6.cc - Operator overloading, hybrid C/C++
ch18p7.cc - Quadratic function solver - C++
ch18p8.cc - Circle written with structs
ch18p9.cc - Circle written with classes
ch18p10.c - Cylinder added
ch18p11.c - Area function/function overloading
ch18p12.cc - Area function for all three
Header Files
cpxutil.h
modarg.h
Assignments
Assignment 1
Here is my code : assign1.c
Assignment 2
Here is my code : assign2.c
Assignment 3
Here is my code : assign3.c
Assignment 4
Here is my code : cramers.c - Finds det by exapnision by minors
Here is my code : cramersa.c - same without multidimensional arrays
Here is my code : cramersb.c - Finds determinant by row reduction
Assignment 5
Turning In Assignments
In pine, choose compose message. To send me the file,type my address in the "To:" field. Type the name ofthe file in the "Attchmnt:" field and then typewhatever you want in the subject and message. To send,it hit ctrl-x and then y.