1
我想在C中打印如%d
,但它顯示了一些數字。如何在c中打印%d?
我想在C中打印如%d
,但它顯示了一些數字。如何在c中打印%d?
printf("%%d")
,或者只是fputs("%d", stdout)
。
要獲得%
您需要有%%
。
printf("%%d");
打印
%d
的printf
手冊頁說:
conversion
specifier
% A '%' is written. No argument is converted. The complete con‐
version specification is '%%'.