in Technology by (1.8m points)

Describe the newline escape sequence with a sample program?

1 Answer

0 votes
by (1.8m 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

0 votes
asked Nov 21, 2021 in Education by JackTerrance (1.8m points)