自己看
stdio.h
目录[隐藏]
简介
使用
[编辑本段]简介
stdio.h就是指“standard input&output"
意思就是说标准输入输出头文件!
所以了,用到标准输入输出函数时,就要调用这个头文件!
[编辑本段]使用
调用
#include<stdio.h> 或#include"stdio.h"
在TC2.0中,即使不加此文件包含命令也可以编译通过。
stdio.h中的标准输入输出函数
int getchar() //从标准输入设备读入一个字符,显示
int putchar() //向标准输出设备写一个字符
int scanf(char *format[,argument…]) //从标准输入设备读入数据
int printf(char *format[,argument…]) //格式化字符串输入到标准输出设备
int puts(char *string) //输出一个字符串到标准输出设备
char *gets(char *string) //从标准输入设备读入一个字符
int sprintf(char*string,char*format[,…])//格式化一个字符串输出到字符数组中,不显示
stdio.h中内容
/*
* stdio.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Definitions of types and prototypes of functions for standard input and
* output.
*
* NOTE: The file manipulation functions provided by Microsoft seem to
* work with either slash (/) or backslash (\) as the directory separator.
*
*/
#ifndef _STDIO_H_
#define _STDIO_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
#include <stddef.h>
#define __need___va_list
#include <stdarg.h>
#endif /* Not RC_INVOKED */
/* Flags for the iobuf structure */
#define _IOREAD 1 /* currently reading */
#define _IOWRT 2 /* currently writing */
#define _IORW 0x0080 /* opened as "r+w" */
/*
* The three standard file pointers provided by the run time library.
* NOTE: These will go to the bit-bucket silently in GUI applications!
*/
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
/* Returned by various functions on end of file condition or error. */
#define EOF (-1)
/*
* The maximum length of a file name. You should use GetVolumeInformation
* instead of this constant. But hey, this works.
* Also defined in io.h.
*/
#ifndef FILENAME_MAX
#define FILENAME_MAX (260)
#endif
/*
* The maximum number of files that may be open at once. I have set this to
* a conservative number. The actual value may be higher.
*/
#define FOPEN_MA
STDIO.H_IT/计算机_专业资料。C语言标准头文件/* stdio.h Definitions for stream input/output. */ #ifndef STDIO_DEF #define STDIO_DEF #ifndef SIZE_T...
stdio.h头文件_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 stdio.h头文件_IT/计算机_专业资料。教材,单片机,C语言...
函数stdio.h_工学_高等教育_教育专区。好任何程序都会用到stdio.h,所以这个跟随机数函数没多大关系,<stdlib.h>包含的是随机数函数rand() 和随机数函数 srand(...
stdio.h文件_工学_高等教育_教育专区。stido.h/* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991, 1994-2010, 2011 Free Software ...
stdio.h 头文件提供的常用函数解析_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 stdio.h 头文件提供的常用函数解析_计算机软件及...
C标准库源码解剖(13):输入输出函数stdio.h_IT/计算机_专业资料。C标准库源码解剖(13)C 标准库源码解剖(13):输入输出函数 stdio.h 分类: C 2009-10-22 22...
#include<stdio.h> #include <conio.h> //#define EOF -1 int main() { char ch; int acnt=0,ecnt=0; int icnt=0,ocnt=0,ucnt=0;...
iostream.h和stdio.h_IT/计算机_专业资料。iostream.h 和 stdio.h 2010-02-05 08:34 1、要区分标准 C 的库和标准 C++的库。iostream 是 C++的库,stdio....
输入输出函数 stdio.h 功能 关闭fp所指的文件,释放文件缓冲区 判断文件是否结束 从fp所指的文件中取得下一个字符 从fp所指的文件中读取一个长度为n-1的字符串...
热门文档