Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What are integer variables, escape characters and so on used for?
What are integer variables, escape characters and so on used for?
There is no escape character like' \d' '\s', is there?

As you said before,' \n' '\t' These are all, and the meaning is not explained.

Others include' \a' ring' \b' backing a space' \f' changing pages' \ \' changing slashes' \ "'changing double quotation marks' \0' empty characters (used to end the string).

There is also' \ddd'(d stands for octal number), which is the corresponding character of octal internal code.

\xdd'(d stands for 16 decimal number) 16 decimal internal code corresponding character.

You should be talking about %d %s, not an escape character, but a format controller, also called a format placeholder, which can only be used in scanf and printf.

%d stands for input and output (10 base) integer position %s stands for input and output string position %c stands for input and output character position.

%% for output% symbol %o for input and output octal integer position %x for input and output 16 hexadecimal integer position.

%f represents the input and output decimal positions (note that by default, 6 decimal digits are output) %u represents the input and output unsigned integers.

%e means that the decimal number is forced to be output exponentially at this position.