What is the newline character in the C language: \r or \n?

The Solution to What is the newline character in the C language: \r or \n? is


It's \n. When you're reading or writing text mode files, or to stdin/stdout etc, you must use \n, and C will handle the translation for you. When you're dealing with binary files, by definition you are on your own.

~ Answered on 2013-08-22 13:20:36


Most Viewed Questions: