help with standard deviation

I need help writing a program that will find the smallest, largest, average and standard deviation in a collection of N real numbers in an input file. The value of N should not be greater than 20, and should be the first input from the file; the N numbers will be collected in an array that is built and returned from the function double *collect_N(FILE *fp, int N);. Each of 4 values, smallest, largest, average and standard deviation, computed should take this array as input (there may be other inputs to the functions) and should be computed in their own function. Any suggestions would be appreciated.