上一页 1 ··· 299 300 301 302 303 304 305 306 307 ··· 408 下一页
摘要: c语言中以10进制、8进制、16进制显示同一个数字。 1、 #include <stdio.h> int main(void) { int x = 100; printf("dec: %d; octal: %o; hexadecimal: %x\n", x, x, x); printf("dec: 阅读全文
posted @ 2021-06-22 21:13 小鲨鱼2018 阅读(237) 评论(0) 推荐(0)
摘要: 1、文本复制 fgetc、fputc函数实现 #include <stdio.h> int main(void) { int ch; FILE *sfp; FILE *dfp; char sfilename[FILENAME_MAX]; char dfilename[FILENAME_MAX]; p 阅读全文
posted @ 2021-06-11 17:21 小鲨鱼2018 阅读(1751) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> int main(void) { int ch; FILE *sfp; FILE *dfp; char sfile[FILENAME_MAX]; char dfile[FILENAME_MAX]; printf("source file name: "); 阅读全文
posted @ 2021-06-11 16:33 小鲨鱼2018 阅读(43) 评论(0) 推荐(0)
摘要: 1、 #include <stdio.h> #include <ctype.h> int main(void) { int n; unsigned long count = 0; unsigned char buf[16]; FILE *fp; char fname[FILENAME_MAX]; p 阅读全文
posted @ 2021-06-11 12:56 小鲨鱼2018 阅读(61) 评论(0) 推荐(0)
摘要: 1、13-11 #include <stdio.h> int main(void) { FILE *fp; int i; double b[10]; double a[] = {0.1,1.1,2.1,3.1,4.1,5.1,6.1,7.1,8.1,9.1}; if((fp = fopen("tmp 阅读全文
posted @ 2021-06-11 11:50 小鲨鱼2018 阅读(94) 评论(0) 推荐(0)
摘要: c语言向文本文件、二进制文件中写入实数。 1、 #include <stdio.h> int main(void) { FILE *fp; double pi = 3.14159265358979323846; printf("pi from value: %23.21f.\n", pi); // 阅读全文
posted @ 2021-06-11 11:16 小鲨鱼2018 阅读(543) 评论(0) 推荐(0)
摘要: 13-8、 #include <stdio.h> int main(void) { FILE *sfp; FILE *dfp; int ch; char sfilename[FILENAME_MAX]; char dfilename[FILENAME_MAX]; printf("Please inp 阅读全文
posted @ 2021-06-11 10:39 小鲨鱼2018 阅读(45) 评论(0) 推荐(0)
摘要: 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 阅读(191) 评论(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 阅读(134) 评论(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 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 299 300 301 302 303 304 305 306 307 ··· 408 下一页