What does \t mean in c language

hzc
Release: 2020-07-01 15:49:15
Original
127949 people have browsed it

The [\t] in C language represents the horizontal tab character, which is equivalent to pressing the TAB key on the keyboard. The width is usually equivalent to 8 spaces, but some software allows the width of the tab to be set. , valid in strings represented by double quotes or delimiters, and invalid in strings represented by single quotes.

What does \t mean in c language

The [\t] in C language represents the horizontal tab character, which is equivalent to pressing the TAB key on the keyboard. Usually the width is equivalent to 8 The position of the space, but some software allows you to set the width of the tab, which is valid in strings represented by double quotes or delimiters, but invalid in strings represented by single quotes.

Generally speaking, its output display in the terminal and file is equivalent to pressing the TAB key on the keyboard. In a typical system, horizontal tabs will occupy 8 columns. At the same time, the initial position

that the horizontal tab begins to occupy is column 8*n (the subscript of the first column is 0).

#include<stdio.h>
#include<stdlib.h>
int main(int argc, char* argv[])
{    
     printf("ab c");        
     printf("\t");        
     printf("333312345e\r")
     printf("12345");     
     printf("jk\n");       
     system("pause");   
     return 0;
}
Copy after login

The meaning of other escape characters

What does \t mean in c language

Recommended tutorial: "c Language Tutorial"

The above is the detailed content of What does \t mean in c language. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template