- Assign the file name & location to the variable filename.
- fopen() function is used to open the file.
- a+ – Opens a file in read and write mode and sets pointer to the first character in the file. And, it can’t modify existing contents.
- Use lr_eval_string() function to read the correlation parameter value.
- fprintf() function is used to write into the file.
- fclose() function is used to close the file.
C Program: