/* ** Group members: ** Don Hummels ** ** Project: Example program in C ** ECE 486, Spring 2008 ** ** Description: An array is initialized and passed to the function that ** will add 10 to each value of the array. The resulting output array will be stored ** in the output file called test.txt. */ #include #include "add_10.h" #define SIZE 10 #define OUTFILE "test.txt" int main() { FILE *fp; /*pointer to a file*/ int i; double array[]={0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0}; /* ** Structure Initialization */ fp=fopen(OUTFILE, "w"); /* open the output file for writing */ /* ** First list the original array values in the output file */ fprintf(fp,"Old array values:\n"); for (i = 0; i