For starters in the beginning of the program you changed the static variable b
b = b-1;
the keyword static
does not have the meaning as the keyword const
.
On the other hand, in this call of printf
there is evidently a typo
printf("%d
","%d",a,b);
^^^^
In fact you are trying to output a pointer to the string literal "%d"
as an integer.
That is the function has four arguments and only one conversion specifier in the first argument.
The compiler could issue a warning that there are redundant arguments in the call of printf
.
You could write for example like :)
printf("%d
" "%d",a,b);
In this case the output would be
11
1
Because the above call is equivalent to
printf("%d
%d",a,b);
But it seems you mean
printf("%d %d
", a, b);
So neither static variable is changed spontanno.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…