When we work with text files in C language, we can use "\n" for writing a "newline" in the text file. However, depending on the operating system, this character is stored differently on the file.
Unix uses LF (line feed) Mac OS uses CR (carriage return) Microsoft Windows uses CR+LF
So, when we open a text file for reading it, I think that we need to consider that the format of the text file is different and dependent on the OS. Am I correct?
If this is correct, how to deal efficiently in my C program with files that can be produced in different OS?