Tab Escape Sequence using CPP

  1. Home
  2. Tutorials
  3. CPP
  4. CPP Programs
  5. Escape Sequence
  6. 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

tab escape sequence code example in c++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.

 

 

Comments
Login to TRACK of Comments.