You can use the library function in math.h, you will need to include math.h 5. Read all the sample values from the file one by one (you will need to rewind) and find and print the minimum and maximum values among all samples (on terminal). Using the same loop. also calculate and print on the terminal the mean/average value of all the samples. Note – File opening is a type of resource acquisition and may fail. Hence the return value must be checked. If fopen ( fails. it returns NULL. your program may check for the return value to be NULL, and in such a case exit with a suitable message