The space may or may not have string,
The code below
# include & lt; Stdio. H>
# define NEGFMT "% [^]]"
# define DECFMT "% d
"Int main () {
Char a1 [10], a2 [10].
Int a3;
The FILE * fp.
Fp=fopen (" data1. TXT ", "r");
Fscanf (fp, "[]" NEGFMT "| | [" NEGFMT"] [" DECFMT "] ", a1, a2, & amp; A3);
Printf (" % s \ n \ n % s % d ", a1, a2, a3);
return 0;
}
The final output is
Abc123
0
Dear leaders, how to keep my a3 accurately, because it is the university curriculum design, unable to change the text content, troublesome everybody bosses