Program: Write a program that computes the average and standard deviation of a set of double values read from a file.
Your program should read data from a file which contains one number per line. The total number of lines is not known before execution of the program. The program should detect the end of file to stop reading the data. It should conform to the subsequent format:
$ ./sdev < file.dat
The average is 23.8733
The standard deviation is 1.4754
Provide the code of this program show each and every step and add comments in code section that will be useful in the future.