一,格式化输入输出函数:
1,print();
int print(const char * format)
2,scanf();
int scanf(const char * format)
3,fprint();
int fprint(FILE *stream,const char * format)
向stream流中输入。。。
4,fscanf();
int fscanf(FILE *stream,const char * format)
二,非格式化输入输出函数:
1,字符输入输出函数
1.1,getc();
int getc(FILE *stream);//getc()函数为宏定义
1.2,fgetc();
int fgetc(FILE *stream);//fgetc() 为函数
1.3,getchar();
int getchar(void); #define gechar() getc(stdin)
while((ch=getchar())!='\n')
1.4,getch();非c标准函数
从标准流中读取一个字符,不带回显,即用户从键盘输入一个字符,不显示在显示器上
1.5,getche();非c标准函数
从标准流中读取一个字符,带回显,即用户从键盘输入一个字符,显示在显示器上
1.6,putc();
int putc(int ch ,FILE *stream);//
1.7,fputc();
int fputc(int ch,FILE *stream);
1.8,putchar();
int putchar(int ch);
2,字符串输入输出函数
2.1,gets();
char * gets(char *s);从标准流中逐个读取字符到字符串中,直到遇到换行并且丢弃换行符。
2.2.fgets();
char * fgets(char *s,int n ,FILE *stream);
2.3,puts();
int puts(const char *s)//向标准流stdout输出字符串
puts("hello") 写入字符串中的字符以后,总是加入换行符
2.4,fputs();
int fputs(const char *s,FLIE *stream);
fputs是puts的通用版,可以向任意流中写入字符,区别于puts函数fputs不会自己写入换行符,除非本身有换行符。
3,块输入输出函数
3.1,freed();
3.2,fwrite();
4,fflush(FILE *stream);
5,fseek()
6,rewind();