STDIN和键盘缓冲区之间有什么区别? [英] what'd the difference between STDIN and Keyboard buffer ?

查看:241
本文介绍了STDIN和键盘缓冲区之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

STDIN和键盘缓冲区有什么区别?


当我通过scanf获取字符时,我输入一些字符然后按

输入,

那么,角色去哪儿了?到STDIN或键盘缓冲区?他们一样好吗?


谢谢^^

What''s the difference between STDIN and Keyboard buffer ?

when i get char through scanf, i type in some characters and press
enter,
then, where do the characters go ? to STDIN or Keyboard buffer ? are
they same ?

thanks ^^

推荐答案



" herrcho" <他********* @ kornet.net>在消息中写道

news:bk ********** @ news1.kornet.net ...

"herrcho" <he*********@kornet.net> wrote in message
news:bk**********@news1.kornet.net...
STDIN与STDIN之间的区别是什么?键盘缓冲?


至于标准C语言,没什么。也没有

与它有关。


然而,''stdin''(注意小写)是标识符

表示C标准库用来指定程序的''标准

输入流'。


C不支持任何特定硬件设备,

可以是键盘,meeces,视频显示器等等。

所有i / o都被抽象为'字符串''。
<当我通过scanf获取字符时,我输入一些字符然后按
输入,
然后,字符在哪里?


他们存储在对象中,你必须提供地址,你必须提供
作为''scanf()''的参数?什么

发生在用户按下键之间

和你的数据存在于你的b
变量点取决于你的平台,并且不是由C语言处理的
,这是平台

独立。


到STDIN或键盘缓冲区?他们是一样的吗?
What''s the difference between STDIN and Keyboard buffer ?
As to the standard C language, nothing. Neither has
anything to do with it.

However, ''stdin'' (note the lower case) is the identifier
that the C standard library uses to designate the ''standard
input stream'' of a program.

C has no support for any particular hardware devices,
be they keyboards, meeces, video displays, or whatever.
All i/o is abstracted as ''streams of characters''.

when i get char through scanf, i type in some characters and press
enter,
then, where do the characters go ?
They''re stored in the object whose address you must
have supplied as an argument to ''scanf()''? What
happens between the time the user presses the keys
and the point where your data is present in your
varaible depends upon your platform, and is not
addressed by the C language, which is platform
independent.

to STDIN or Keyboard buffer ? are
they same ?




见上文。


BTW您的问题的动机是什么?


-Mike



See above.

BTW what is the motivation for your questions?

-Mike


Mike Wahler写道:
Mike Wahler writes:
到STDIN或键盘缓冲区?他们一样吗?
to STDIN or Keyboard buffer ? are
they same ?



见上文。

BTW你的问题的动机是什么?



See above.

BTW what is the motivation for your questions?




对我来说听起来像是另一个喜欢*知道*事情的人。

也许他意识到这会让你感到多么烦恼。



Sounds to me like another one of those guys that just like to *know* things.
Perhaps he realizes how much this irritates you.


Mike Wahler写道:
Mike Wahler wrote:
C不支持任何特定的硬件设备,它们是键盘,meeces,视频显示器等等。
所有我/ o被抽象为''字符流''。
C has no support for any particular hardware devices,
be they keyboards, meeces, video displays, or whatever.
All i/o is abstracted as ''streams of characters''.




h ***是什么meeces?这是老鼠的复数;)(反过来

是复数的鼠标)?


-

Martijn
http://www.sereneconcepts.nl


这篇关于STDIN和键盘缓冲区之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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