An Introduction to C: HW 3
Read the HW submission instructions for directions on how to submit your homework electronically to me.
Due Thursday, 28 April 2011 at 11:59 PM
Reduce the diamond program from HW2 to the following:
#include <stdio.h>
#include “diamond.h”
int main( void )
{
draw_diamond();
return 0;
}
You must implement the following functions
void draw_diamond( void ); void print_odd( int *number ); void print_even( int *number );
in an implementation file (diamond.c) and
the prototypes for those functions in a header file
(diamond.h).
Make extensive use of pointers and the principle of least privilege.