Review: basic knowledge of C language 1

Time:2019-10-25

Placeholder:

%D,% I, for integer,% f-floating point,% s, string,% C, char.% P pointer,% FL long long,% e scientific count,% G decimal or scientific count.
Format placeholders in C:
%A,% a reads a floating-point value (p-count (hex count), C99 only)
%C read in a character
%D read in decimal integer
%E convert numerical value to exponential form (EJ counting method)
%I read in decimal, octal, hexadecimal integer
%O read in octal integer
%X,% x reads hexadecimal integer
%S reads a string, ending with a space, tab, or line break.
%F,% F,% e,% e,% G,% G are used to enter real numbers, which can be entered in decimal or exponential form.
%P reads a pointer
%U reads an unsigned decimal integer
%N the equivalent number of characters read into the value so far
%[] scan character set
%%Read% symbol
 

Escape character

 
Escape character
Significance
ASCII value (decimal)
\a
Ring (BEL)
007
\b
Backspace (BS), move current position to previous column
008
\f
Page feed (FF), move the current position to the beginning of the next page
012
\n
Line feed (LF), moves the current position to the beginning of the next line
010
\r
Enter (CR), move the current position to the beginning of the line
013
\t
Horizontal tabulation (HT) (skip to next tab position)
009
\v
Vertical tabulation (VT)
011
\\
Represents a backslash character ” \ ‘
092
\’
Represents a single quotation mark (apostrophe) character
039
\”
Represents a double quote character
034
\? For a question mark 063
\0
Null (nul)
000
\ddd
Any character represented by 1 to 3 octal numbers
Three digit octal
\xhh
Any character represented by hexadecimal
Hexadecimal

 

Recommended Today

[Redis5 source code learning] analysis of the randomkey part of redis command

baiyan Command syntax Command meaning: randomly return a key from the currently selected databaseCommand format: RANDOMKEY Command actual combat: 127.0.0.1:6379> keys * 1) “kkk” 2) “key1” 127.0.0.1:6379> randomkey “key1” 127.0.0.1:6379> randomkey “kkk” Return value: random key; nil if database is empty Source code analysis Main process The processing function corresponding to the keys command is […]