0
Is anyone know the alternative of (\n) in C program.
3 Respostas
+ 1
Hey there Kishan Kumar,
There are 2 alternatives:
- Use the ASCII value of ‘\n’ (\012)
- or just use a blank 'puts()'.
Happy coding 😃✌🏻
+ 1
That is the reason why we need converter application to use for MS-DOS and WINDOWS to UNIX platform and vice versa.
DHANANJAY
- 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