in Technology by

Describe the newline escape sequence with a sample program?

1 Answer

0 votes
by
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;
}

Related questions

0 votes
    The escape sequence ‘\f’ stands for Floating numbers Representation of functions that returns a value Form feed None of the above...
asked Dec 24, 2020 in Technology by JackTerrance
0 votes
    The escape sequence \f' stands for _________ (a) Floating numbers (b) Representation of functions that ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    If a coin is tossed two times, describe the sample space associated to this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    If a coin is tossed three times (or three coins are tossed together), then describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    Two dice are thrown. Describe the sample space of this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    A coin is tossed and then a die is thrown. Describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    A coin is tossed and then a die is rolled only in case a head is shown on the coin. Describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    A coin is tossed twice. If the second throw results in a tail, a die is thrown. Describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 21, 2021 in Education by JackTerrance
0 votes
    If a coin is tossed three times (or three coins are tossed together), then describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 14, 2021 in Education by JackTerrance
0 votes
    A coin tossed and then a die is thrown. Describe the sample space for this experiment. Select the correct answer from above options...
asked Nov 14, 2021 in Education by JackTerrance
0 votes
0 votes
    Write a program go chech the numbers are 4placed successively in a graycode sequence Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    A flowchart is a …………….. representation of a sequence of operations to show a process or a program Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
...