Tab Escape Sequence 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 \t Second \t Third \t Forth \t Fifth";
return 0;
}
Output
Working
This program use \t (tab escape sequence) to insert tab in output. Here we use two cout (output) statements, one with \t and other without \t to see the impact on output.