New Line Escape Sequence Program Example using CPP
- Home
- Tutorials
- CPP
- CPP Programs
- Escape Sequence
- Program
Source Code
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
// Output without Escape Sequence
cout<<" First Second Third Forth Fifth";
// Output with Escape Sequence
cout<<" First \n Second \n Third \n Forth \n Fifth";
return 0;
}
Output
Working
This program demonstrate usage of new line escape sequence. There are two output statements that are used to show impact of \n (new line escape sequence) on output.