What?
Escape Sequence !!!
Yeah, you heard that right
There are some characters in C, which breaks the sequence of characters for formatting the output of a program, that's why these characters are called escape sequence.
Most used escape sequences are
/n - this is also called newline character
/t - you can call it TAB character
Yeah, you guess that right, the '\n' - newline character prints a newline when it is within double quotation("") of printf() function.
Look at the top-left corner of your computer keyboard, you will find a button called TAB.
Look at the top-left corner of your computer keyboard, you will find a button called TAB.
Now, open an editor
start editing a file
When you press TAB, it inserts 8 spaces by default. In some editors, you can modify the TAB size like Sublime Text, Code-Blocks etc.
for my case, I am using 4 space TAB.
So, in the editor, it depends upon your choice
But, in C program output '\t' - TAB character prints 8 spaces when it is within double quotation("") of printf() function.
there is an interesting story about TAB vs. Spaces 💣 in
Silicon Valley Season 3 Episode 6 💣💥
hope you like it
Happy Coding
See you in the next tutorial
Next Post:
https://coderavens.blogspot.com/2018/05/c-programming-45-printf-function.html
TAB vs. Spaces
there is an interesting story about TAB vs. Spaces 💣 in
Silicon Valley Season 3 Episode 6 💣💥
hope you like it
Happy Coding
See you in the next tutorial
Next Post:
https://coderavens.blogspot.com/2018/05/c-programming-45-printf-function.html
Comments
Post a Comment