Example Code

(Last Mod: 27 November 2010 21:38:37 )

ECE-1021 Home


This is a collection of programs that perform various tasks - ranging from simple demo programs to illustrate a single concept to programs that actually perform some useful task.

Some programs are very bare with no commenting at all, others are documented rigidly according to the style guidelines in affect at the time the program was written.

Name Platform Description/Comments
template.c ANSI Template source code file
mod2ar0.c ANSI Module 2 Demo - Number Representation
hw3start.c ANSI HW#3 Starter Code
crossrep.c ANSI Illustrates the effect of cross representation
hextable.c ANSI Generates the following tables:
  • Hexadecimal Reference Table
  • Hexadecimal Addition Table
  • Hexadecimal Multiplication Table
reverse.c ANSI Reverses a string in place
  • Using pointers
histo.c ANSI Generates a histogram of the byte values in a file.
  • Command Line Arguments
  • Basic File Operations
filedump.c ANSI Presents the contents of a file byte-by-byte
pong.c DOS Shows use of conio.h functions.

This is the first pass at the core of a pong emulator - you might want to use it as a starting point and finish implementing the full game.

 mancala.zip  DOS Project Tournament Engine
  • Each person has a *.h file in the zip folder.
  • Modify the function in this file and submit this file to the grader.
  • Do not change the filename (i.e., no revision in file name).
 mancala.c  DOS Rev 2 of the Mancala Tourny Engine
mod3Ar0.c DOS Module 3 Demo Program - loop timing
randgen.c ANSI HW#7 Data file generator and demo code.
rwa_0509.c DOS Recursive Tiling from Section 5.9
cmdarg.c ANSI Command Line Arguments and Dynamic Memory Allocation
cg.dat TEXT Data File for W&B Homework
filedemo.c ANSI Demo program that uses files in all four ways (wt, rt, wb, rb)
sine1000.c ANSI VERY basic, brute force program to generate a simple WAV file
wavedump.exe ANSI WAV Stripper (dumps data to a text file)
pt3d.c ANSI Structure Demo Program