当前位置: 首页 > news >正文

玉溪市住房城乡建设局网站产品策划书模板

玉溪市住房城乡建设局网站,产品策划书模板,百家号优化,电子商务平台经营者不能是《Programming Abstractions In C》学习第55天#xff0c;p139-p140#xff0c;总结如下#xff1a; 一、技术总结 1.文件I/O操作 文件I/O操作可以分为一下这些步骤#xff1a; (1)声明文件指针对象。 File *infile;(2)打开文件 fopen()。打开文件的模式有“r”, “w…《Programming Abstractions In C》学习第55天p139-p140总结如下 一、技术总结 1.文件I/O操作 文件I/O操作可以分为一下这些步骤 (1)声明文件指针对象。 File *infile;(2)打开文件 fopen()。打开文件的模式有“r”, “w”, a三种模式。 (3)传输数据 读取文件的方式可以是character by character( getc()/putc() )也可以是line by line( fget()/fput() )。 (4)关闭文件 fclose()。 2.文件I/O操作示例复制文件 #include stdio.h #include stdbool.h // for bool, true, false data type #include stdlib.h // for exit()void CopyRemovingComments(FILE *infile, FILE *outfile);int main() {// 声明文件指针对象FILE *infile, *outfile;char *infileName, *outfileName;/** 打开文件fopen()* 如果文件不存在则返回NULL所以需要检查*/infileName D:\\CProject\\chater3.4\\jabber.txt; // 这里使用的是绝对路径也可以使用相对路径outfileName D:\\CProject\\chater3.4\\jabbercopy.txt;infile fopen(infileName, r);if (infile NULL) {printf(Cannot open input file: %s \n, infileName);exit(0);}/** 传输数据* 传输数据有很多种方式例如chracter by charactergetc/putc,line by line(fget/fput, ReadLine)* 为了解决stdio.h存在的一些问题作者对stdio进行了封装封装后得到的的是simpio*/outfile fopen(outfileName, w);if (outfile NULL) {printf(Cannot open output file: %s \n, outfileName);exit(0);}CopyRemovingComments(infile, outfile);/** 关闭文件*/fclose(infile);fclose(outfile);printf(Copying is completed);return 0; }void CopyRemovingComments(FILE *infile, FILE *outfile) {int ch, nch;bool commentFlag; // 这里使用的是stdbool.h接口中的boolcommentFlag false; // 这里使用的是stdbool.h接口中的false,书中使用的是封装后的FALSEwhile ((ch getc(infile)) ! EOF) {if (commentFlag) {if (ch *) {nch getc(infile); //if (nch /) {commentFlag false;} else {ungetc(nch, infile);}}} else {if (ch /) {nch getc(infile);if (nch *) {commentFlag true;} else {ungetc(nch, infile);}}if (!commentFlag) {putc(ch, outfile);}}} }二、英语总结 1.endpoint什么意思 答c.the end of sth(终点)。 2.transfer什么意思 答transfer也是一个在计算机相关资料中经常看到的词。p140, For an input file, the function read data from the file into your program; for an output file, the function transfer data from the program to the file。数据从文件到程序中或者从程序中到文件即是一种transfer。通过该例句对tranfer有一个形象的了解。 3.intermix什么意思 答 (1)解释vi/vt. to combine two or more different things。 (2)搭配intermix sth with sth。 (3)例句p140, Doing so allows you to intermix numeric data with strings and other data types。 三、参考资料 1. 编程 (1)Eric S.Roberts《Programming Abstractions in C》https://book.douban.com/subject/2003414 2. 英语 (1)Etymology Dictionaryhttps://www.etymonline.com (2) Cambridage Dictionaryhttps://dictionary.cambridge.org 欢迎搜索及关注编程人(a_codists)
http://www.zqtcl.cn/news/935713/

相关文章:

  • 网站建设教育板块wordpress $pagenow
  • 岳阳手机网站建设自己可以给公司做网站吗
  • 旅游网站建设目的关于建设网站的需求分析
  • 手机可以建立网站吗自己造网站
  • 厦门建网站哪家好手机编程网站
  • 网站搭建后台奥门网站建设
  • 电子商务网站免费模板展示型网站与营销型网站
  • 除了红动中国还有哪些设计网站宁波建网站哪家
  • 网站的建设费用预算策划书wdcp网站备份
  • 济南制作公司网站网站设计的实例
  • 网站建设需要的文案一个网站的后台怎么做
  • 电影网站建设模板营销方式都有哪些
  • 书店商城网站建设方案未央免费做网站
  • 北京房产网北京二手房企业网站seo方案案例
  • 大连品牌官网建站二级建造师最好的网站
  • python开发工具搜索引擎优化的英语简称
  • 做产品代理上哪个网站好东莞公司网上推广
  • 专业制作网站公司上海广告公司联系方式
  • 古交市网站建设公司四川省建设厅电子政务网站
  • 清河网站建设费用50万做网站
  • 怎么找网站的根目录平台类网站营销方案
  • 网站关键词 价格生成山西建设工程备案网站
  • 网站开发入哪个会计科目设计师自己的网站
  • php做网站界面代码定制网页设计报价
  • 重庆智能模板建站wordpress+widget+开发
  • vps网站空间时尚网站首页设计
  • 美容行业网站建设方案网站建设需求背景
  • 贵阳做网站找哪家好长沙部分风险区域调整
  • 设计网站 常用微信网站建设口碑好
  • 网站建设加盟列举网络推广的方式