上一页 1 ··· 261 262 263 264 265 266 267 268 269 ··· 367 下一页
摘要: 1、 #include <stdio.h> #include <ctype.h> int main(void) { int ch; FILE *sfp; FILE *dfp; char sfile[FILENAME_MAX]; char dfile[FILENAME_MAX]; printf("sf 阅读全文
posted @ 2021-06-09 09:30 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int ch; FILE *sfp; FILE *dfp; char sfile[FILENAME_MAX]; char dfile[FILENAME_MAX]; printf("sfile name: "); scanf 阅读全文
posted @ 2021-06-09 09:10 小鲨鱼2018 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("filename: "); scanf("%s", filename); if((fp = fopen(file 阅读全文
posted @ 2021-06-09 08:07 小鲨鱼2018 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("please input filename: "); scanf("%s", filename); if((fp 阅读全文
posted @ 2021-06-08 22:50 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要: c语言中显示文件内容。 1、 #include <stdio.h> int main(void) { FILE *fp; // 定义FILE型的指针变量,用于接收fopen函数返回的流指针 int ch; // 声明字符,注意是int char filename[FILENAME_MAX]; // 阅读全文
posted @ 2021-06-08 22:29 小鲨鱼2018 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #include <time.h> char filename[] = "timedata.dat"; void put_dat(void) { FILE *fp; if((fp = fopen(filename, "r")) == NULL) print 阅读全文
posted @ 2021-06-08 18:18 小鲨鱼2018 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #include <time.h> char file[] = "datatime.dat"; void put_data(void) { FILE *fp; if((fp = fopen(file,"r")) == NULL) // 未检测到datati 阅读全文
posted @ 2021-06-08 17:42 小鲨鱼2018 阅读(251) 评论(0) 推荐(0) 编辑
摘要: c语言中写入日期和时间。 1、 #include <stdio.h> #include <time.h> int main(void) { FILE *fp; time_t current = time(NULL); struct tm *timer = localtime(&current); i 阅读全文
posted @ 2021-06-08 12:39 小鲨鱼2018 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #include <time.h> // time_t数据类型,日历时间头文件 int main(void) { time_t current = time(NULL); // 利用time函数获取日历时间(返回1970之后的秒数,整型) struct t 阅读全文
posted @ 2021-06-08 12:28 小鲨鱼2018 阅读(2077) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #define NUMBER 6 typedef struct{ char name[128]; double height; double weight; }Type1; int main(void) { FILE *fp; fp = fopen("xx 阅读全文
posted @ 2021-06-07 21:45 小鲨鱼2018 阅读(50) 评论(0) 推荐(0) 编辑
上一页 1 ··· 261 262 263 264 265 266 267 268 269 ··· 367 下一页