会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
299
300
301
302
303
304
305
306
307
···
408
下一页
2021年6月22日
c语言中以10进制、8进制、16进制显示同一个数字
摘要: 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)
2021年6月11日
c语言中实现文件的复制(文本复制和二进制复制)
摘要: 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)
c语言 13-13
摘要: 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)
c语言显示文件自身
摘要: 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)
c语言 13-11、13-12
摘要: 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语言中向文本文件、二进制文件中写入实数
摘要: 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)
c语言 13-8 、13 - 9、13 -10
摘要: 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)
c语言中 fgetc函数、fputc函数实现文件的复制
摘要: 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)
c语言 13-7 利用fgetc函数输出文件的字符数
摘要: 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)
c语言 13-6 利用fgetc函数输出文件的行数
摘要: 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
下一页
公告