+1 vote
in Technology by (321k points)

Describe the newline escape sequence with a sample program?

1 Answer

0 votes
by (321k points)
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.


* 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;

Related questions