如何在C语言中使用stdin函数 [英] How to use the stdin function in c

查看:766
本文介绍了如何在C语言中使用stdin函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows操作系统下使用Stdin和stdout函数c ..


提供示例编码

How to use the Stdin and stdout function c under windows operation system..


Give sample coding

推荐答案

stdin和stdOut不是函数:它们是流.您将流传递给函数以便从中读取:
stdin and stdOut aren''t functions: they are streams. You hand the stream to a function in order to read from it:
char string[256];
printf( "Please enter a long string: " );
fgets ( string, 256, stdin );

fputs("Hello world", stdout);


尊敬的阿达玛,

//在c windows os下


"stdin"代表标准输入
"stdout"代表标准输出
"stderr"代表标准错误

它的功能原型在"stdio.h" headre文件中定义.
只需将其包含在您的代码中
Dear aimdharma,

//Under c windows os


"stdin" stands for standard input
"stdout" stands for standard output
"stderr" stands for standard error

It''s Function prototypes are defined in "stdio.h" headre file.
Just include it in ur code
#include <stdio.h></stdio.h>


并使用它的库函数.

前任.您可能正在使用


and use it''s library functions.

ex. you may be using

scanf("",);  //stdin function.    
     printf("");  //stdout function



我希望你能得到一些东西

好的,见你



I hope u get something

ok see u


这篇关于如何在C语言中使用stdin函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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