1
Describe the newline escape sequence with a sample program?

Open 1 Answers 27 Views Technology

Describe the newline escape sequence with a sample program?

1 Answer

0
The Newline escape sequence is represented by \n. This indicates the point that the new line starts to the compiler and the output is created accordingly. The following sample program demonstrates the use of the newline escape sequence.

Code:

/*
* C Program to print string
*/
#include <stdio.h>
#include <string.h>
 
int main(){
      printf("String 01 ");
      printf("String 02 ");
      printf("String 03 \n");
 
      printf("String 01 \n");
      printf("String 02 \n");
      return 0;
}
by (278k points)
...