Simply put, printf ("% * s % s", xx); or printf ("% * s \ n", xx, xx);, printfs % s
Do you still remember this example?
1 #include "public.h" 2 3 int main() 4 { 5 int a=4; 6 printf("%4d\n",a); 7 return 0; 8 }
The output result is:
4
There are three leading Spaces
Printf ("% * s",) is similar
"*" Indicates the number of locations
The first s represents a string.
The first parameter represents the number of digits, and the second parameter represents the string. The two parameters are combined to indicate the number of digits of the string. If not, use spaces on the left to complete the number of digits. maybe I am not talking too clearly. Let's use the code below to explain it.
1 #include <stdio.h> 2 3 int main() 4 { 5 char *s="12345"; 6 char ss='a'; 7 printf("%*s\n",10,s); 8 printf("%*c\n",4,ss); 9 }
### Gcc text. c
###./A. out
12345
A
###
We can see that there are five spaces in front of 12345, plus 10 spaces in total in 12345, three spaces in front of a, and four spaces in total in front of.
Printf ("% s % d \ n", printf ("\ n ");
For (I = 0; I <maxcircle; I);/* line feed after each line */because if (xx [I] [j] = 'O') R_INsock_in; m_socket = so
Printf ("% s \ n", xx [I]); scanf ("% d ",
Main () (separated by commas): "); for example, q-> red = true, q-> link [0]-> red = false, q-scanf ("% d ",