上一页 1 ··· 259 260 261 262 263 264 265 266 267 ··· 367 下一页
摘要: 1、 #include <stdio.h> int main(void) { FILE *sfp; FILE *dfp; int ch; char sfilename[FILENAME_MAX]; char dfilename[FILENAME_MAX]; printf("Please input 阅读全文
posted @ 2021-06-11 10:00 小鲨鱼2018 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("Please input the filename: "); scanf("%s", filename); if 阅读全文
posted @ 2021-06-11 09:33 小鲨鱼2018 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("Please input the filename: "); scanf("%s", filename); if 阅读全文
posted @ 2021-06-11 09:13 小鲨鱼2018 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1、显示a.txt文件的内容 #include <stdio.h> int main(void) { FILE *fp; int ch; char filename[FILENAME_MAX]; printf("Please input the filename: "); scanf("%s", f 阅读全文
posted @ 2021-06-11 09:04 小鲨鱼2018 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #include <time.h> void put_data(void) { FILE *fp; if((fp = fopen("time.txt", "r")) == NULL) { printf("\aThe program is ran for t 阅读全文
posted @ 2021-06-11 08:11 小鲨鱼2018 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #include <time.h> void put_data(void) { FILE *fp; if((fp = fopen("time.txt", "r")) == NULL) printf("\aThe program is running for 阅读全文
posted @ 2021-06-10 23:00 小鲨鱼2018 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 利用函数库获取当前时间。 1、 #include <stdio.h> #include <time.h> int main(void) { time_t current = time(NULL); struct tm *timer = localtime(&current); printf("cur 阅读全文
posted @ 2021-06-10 22:39 小鲨鱼2018 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { FILE *fp; char name[128]; double height, weight; if((fp = fopen("a.txt", "w")) == NULL) printf("\aFile open fai 阅读全文
posted @ 2021-06-10 21:52 小鲨鱼2018 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1、写入日期和时间 #include <stdio.h> #include <time.h> int main(void) { FILE *fp; time_t current = time(NULL); struct tm *timer = localtime(&current); if((fp 阅读全文
posted @ 2021-06-10 21:18 小鲨鱼2018 阅读(1363) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> typedef struct{ char name[128]; double height; double weight; }Type1; void swap(Type1 *x, Type1 *y) { Type1 tmp = *x; *x = *y; * 阅读全文
posted @ 2021-06-10 19:33 小鲨鱼2018 阅读(31) 评论(0) 推荐(0) 编辑
上一页 1 ··· 259 260 261 262 263 264 265 266 267 ··· 367 下一页