+1 vote
11 views

Describe the newline escape sequence with a sample program?

in Technology by (191k points)

1 Answer

0 votes
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 (191k points)

Related questions

0 votes
1 answer 8 views
8 views asked Nov 8, 2020 in Technology by JackTerrance (191k points)
+1 vote
1 answer 12 views
0 votes
1 answer 37 views
37 views asked Dec 24, 2020 in Technology by JackTerrance (191k points)
+1 vote
1 answer 13 views
+1 vote
1 answer 9 views
9 views asked Nov 8, 2020 in Technology by JackTerrance (191k points)
0 votes
1 answer 118 views
+1 vote
1 answer 7 views
0 votes
1 answer 9 views
+1 vote
1 answer 11 views
0 votes
1 answer 9 views
9 views asked Nov 8, 2020 in Technology by JackTerrance (191k points)
+1 vote
1 answer 12 views
+1 vote
1 answer 19 views
0 votes
1 answer 11 views
0 votes
1 answer 14 views
0 votes
1 answer 13 views
+1 vote
1 answer 12 views
...