Function Prototypes you might find useful:

stdio.h

 int fclose(FILE *stream);

                Closes the file associated with the file pointer “stream”.

 char *fgets( char *s, int n, FILE *stream);

                Reads at most (n-1) characters from stream and places them in s. Returns a pointer to s.

 FILE *fopen(const char *filename, const char  *mode);

                Opens the file named by filename with the mode indicated by mode. Returns NULL on failure. The mode string is “rt” for reading a text file and “wt” for writing a text file.

 int fprintf(FILE *stream, const char *format, ....);

                Same as printf() but outputs to the file pointed to by stream.

 int printf(const char *format, .....);

                Prints formated output to the standard output device (screen).

math.h

 double exp(double x);

                Computes the value of e^x

 double fabs(double x);

                Computes the absolute value of x;

 double log(double x);

                Computes the natural log of x; errors occur if x <= 0.

 double pow(double x, double y);

                Computes x^y.

 double sqrt(double x);

                Computes the square root of x where x >= 0.

stdlib.h

 double atof(const char *s);

                Converts the text pointed to by s to a double value.

 int atoi(const char *s);

                Converts the text pointed to by s to an integer value.

 void *calloc(size_t n, size_t size);

                Allocates space for an array of n objects, each of size size

void *malloc(size_t size);

                Allocates space for an object of size size

 Void free(void *ptr);

                Deallocates the space pointed to by ptr

int rand(void);

                Returns a pseudo-random integer in the range of 0 to RAND_MAX

 void *realloc(void *ptr, size_t size);

                Changes the size of the object pointed to by ptr

 void srand(unsigned int seed);

                Uses the seed to initialize a new sequence of values from rand();