C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章

上传人:w****i 文档编号:94398174 上传时间:2019-08-06 格式:DOC 页数:3 大小:31.50KB
返回 下载 相关 举报
C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章_第1页
第1页 / 共3页
C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章_第2页
第2页 / 共3页
C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章》由会员分享,可在线阅读,更多相关《C++语言基础教程 教学课件 ppt 作者 吕凤翥习题答案 1_ 第12章(3页珍藏版)》请在金锄头文库上搜索。

1、第12章 习题解答12.1判断题对的有1,3,7,8,9,10,12,13,15,17,1812.2单选题ADBDC DCCBA12.3填空题1. lift right internal2. setf() unsetf(0;3. cin cout cerr clog4. oct dec hex5. beg end cur12.4程序结果1. 352ea 234 *234ok1.23457*1.2352. 123173#.3. WWWWWWWWW.WWWWWWW WWWWW WWW W4. 1: abcdef2: 12345673:ijklmn5. abcdef1234567.6. Yan 50

2、2011 2787. I love Beijing!8. 100256 6412.5编程题 1. #include void main() int n=0,ch; coutEnter a string: ; while(ch=cin.get()!=EOF)if(ch=x&cin.peek()=y)n+; coutnendl; 2. #include #include #include void main() fstream file(a.txt,ios:in); if(!file) coutCant open file!n; abort(); int n(0); char ch; while(

3、!file.eof() file.get(ch); +n; coutnendl; file.close();3. #include #include #include void main() fstream out,in; out.open(ab.txt,ios:out); if(!out) coutCant open file!n;abort(); in.open(xy.txt,ios:in); if(!in) coutCant open file!n;abort(); int n(1); char buf80; while(!in.eof() in.getline(buf,sizeof(buf);outn+:bufendl; in.close(); out.close(); 12.6 写出语句1. 答:cout.setf(ios:uppercase); 2. 答:cout.setf(ios:scientific,ios:floatfield);3. 答:coutsetw(5)setfill(#)123endl;4. 答:coutsetw(i)setprecision(j)dendl;5. 答:coutsetw(10)setfill(0)1.2345endl;3

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号