0

Is anyone know the alternative of (\n) in C program.

12th Mar 2021, 12:21 PM
Kishan Kumar
Kishan Kumar - avatar
6 odpowiedzi
+ 1
Hey there Kishan Kumar, There are 2 alternatives: - Use the ASCII value of ‘\n’ (\012) - or just use a blank 'puts()'. Happy coding 😃✌🏻
12th Mar 2021, 12:24 PM
Matthew
Matthew - avatar
+ 1
That is the reason why we need converter application to use for MS-DOS and WINDOWS to UNIX platform and vice versa. DHANANJAY
13th Mar 2021, 1:24 AM
DHANANJAY PATEL
DHANANJAY PATEL - avatar
- 1
The newline character '\n' is treated like a escape sequence character. On UNIX it has deflated as "\r\n" TWO characters for print functionality. It first does carriage return and later moves to newline. This is true for *.txt files line printer and dot matrix printer. While on DOS it remain as '\n' new line character alone. '\012' is octal new line character 0x0a is hexadecimal new line '\015' is octal carriage return character 0x0d is carriage return '\n' and '\r' both are escape sequence characters in C programming language DHANANJAY
12th Mar 2021, 4:37 PM
DHANANJAY PATEL
DHANANJAY PATEL - avatar