file *fopen(const char *filename, const char *mode)
size_t fread(void *ptr, size_t size, size_t, file *stream)
size_t fwrite(const void *ptr, size_t size, size_t n, file *stream)
int fgetc(file *stream)
#include
#include
int main(void)
{
file *fp;
char ch;
if((fp = fopen("test.txt","rt")) == null)
{
printf("file open error!");
exit(1);
}
ch = fgetc(fp);
while(ch != eof)
{
putchar(ch);
ch = fgetc(fp);
}
fclose(fp);
}
int fputc(int c, file *stream)
#include
#include
int main(void)
{
file *fp;
char ch;
if((fp = fopen("test.txt","wt+")) == null)
{
printf("file open error!");
exit(1);
}
printf("please enter a stringn");
ch = getchar();
while(ch != 'n')
{
fputc(ch, fp);
ch = getchar();
}
fclose(fp);
}
fscanf(file *stream, char *format [,argument...])
#include
#include
int main(void)
{
int i;
printf("please enter an interger:");
if(fscanf(stdin, "%d",&i)) //从标准输入流读取
printf("the interger is :%dn",i);
return 0;
}
int fprintf(file *stream, char *format[,argument...])
#include
#include
int main(void)
{
file *stream;
int i = 10;
double fp = 1.5;
char s[] = "hello world";
char c = 'n';
stream = fopen("fprint.out", "w");
fprintf(stream, "%s%c", s, c);
fprintf(stream, "%dn", i);
fprintf(stream, "%fn", fp);
fclose(stream);
return 0;
}
int fseek(file *stream, long offset, int whence)
电神魔傀2街机免费版 官方版v1.2.1
下载三国战纪2手游腾讯渠道服 安卓版v2.41.0.0
下载三国战纪2手游抖音渠道服 安卓版v2.41.0.0
下载三国战纪2折扣服 安卓版v2.41.0.0
下载叫我大掌柜小米版 安卓版v7.4.4
叫我大掌柜小米版是这款模拟经营类手游的渠道服版本,在此版本中
cooking fever正版 安卓最新版v23.0.2
cooking fever正版是一款非常好玩的模拟经营类手游
咖啡厅的生活故事 最新版v1.7
咖啡厅的生活故事是一款模拟经营游戏,玩家们在游戏中可以经营一
迅猛龙模拟器金币不减反增版 v1.1.8
迅猛龙模拟器无限金币版是一款动物模拟类游戏,玩家们将在游戏中
泽塔奥特曼升华器免广告版 v1.4
泽塔奥特曼升华器去广告版是游戏的破解版本,在该版本中为玩家去