Pointers, Arrays, Structs, Argument Passing the C way
Templates in C (using void *)
A. We have constructed a text file containing a collection of structs each of which is made up of 4 fields:
You are to write a program which reads all of the symbol table entries (all of the structs) into memory and sorts them using the qsort routine in the C++ library. Your program should print the struct data as it is read in and then reprint it after the sort. The information in each struct should be printed on a single line (in four columns with appropriate descriptive headers).
Turn In: Listing of a successful run of your program with the output described above.
Due Date: To be determined.
B. Programming (also an individual project) -- Redo the Dice Simulation Program using standard C argument passing and standard C I/O.
Turn In: Just the revised program and its output.
Due Date: To be determined.
CIS 223 Sample Data for Assignment 4-S97 (Part A ONLY):
LDAC
11
1
5
RNUM
41
1
2
SUM
898
1
3
LOOP
881
1
1
STAC
12
1
6
AVERAG
897
1
2
PNUM
42
1
2
ZERO
892
0
2
ONE
893
1
6
ADD
21
1
2
Return to Previous Page