scanf函数 [英] scanf

查看:95
本文介绍了scanf函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

%%是什么? scanf中的格式说明符吗?例如,如果我们写的话


char ch;

scanf(" %%",& ch);


如果对ch有什么改变的话。如果没有使用的话。

What does the "%%" format specifier in scanf do? eg if we write

char ch;
scanf("%%", &ch);

what change if any does it make to ch. If it does not whats the use.

推荐答案

Ab写道:
什么是% %QUOT; scanf中的格式说明符吗?


预计%字符

例如,如果我们写的话

char ch;
scanf(" %%" ;,& ch);

如果对ch有什么改变。




如果没有使用。
What does the "%%" format specifier in scanf do?
expects a % character
eg if we write

char ch;
scanf("%%", &ch);

what change if any does it make to ch.
none
If it does not whats the use.




见上文

-

Nick Keighley


真正的程序员想要一个你问过它,你得到了它

文本编辑器 - 复杂,神秘,强大,无情,

危险。确切地说,TECO。



see above
--
Nick Keighley

"The Real Programmer wants a "you asked for it, you got it"
text editor--complicated, cryptic, powerful, unforgiving,
dangerous. TECO, to be precise."


Ab < AB *************** @ honeywell.com>写道:
"Ab" <ab***************@honeywell.com> wrote:
%%是什么? scanf中的格式说明符吗?
What does the "%%" format specifier in scanf do?




它阻止巨魔阅读fscking手册。


HTH;手; FOAD。


Richard



It stops trolls from reading the fscking manual.

HTH; HAND; FOAD.

Richard


Ab在19/08/05写道:
Ab wrote on 19/08/05 :
什么是" %%" scanf中的格式说明符吗?例如,如果我们写


它是格式字符串中''%''的''escape''值。

char ch;
scanf(" %%",& ch);

如果对ch有什么改变。如果它没有使用。
What does the "%%" format specifier in scanf do? eg if we write
It''s the ''escape'' value for ''%'' in a format string.
char ch;
scanf("%%", &ch);

what change if any does it make to ch. If it does not whats the use.




未定义的行为(参数的数量与编号的数量不一致

)。任何事情都可能发生。


-

Emmanuel

C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html

C库: http:// www。 dinkumware.com/refxc.html


" Mal nommer les choses c''est ajouter du malheur au

monde。 - Albert Camus。



Undefined Behaviour (The number of parameters doesn''t match the number
of formaters). Anything could happen.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"Mal nommer les choses c''est ajouter du malheur au
monde." -- Albert Camus.


这篇关于scanf函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆