地质大学(北京)2010年研究生C++试题A.docVIP

  • 5
  • 0
  • 约7.15千字
  • 约 8页
  • 2016-10-17 发布于江西
  • 举报
地质大学(北京)2010年研究生C++试题A.doc

课程号:SG04006 《C++程序设计》考试试卷(A) 考试形式:闭卷考试 考试时间:120分钟 所有答案答在答题纸上,试卷和答题纸一并上交存档 院系 学号 姓名 得分 题号 一 二 三 四 总分 一、选择题。本题共10题,每题3分。 1. 以下代码的输出结果是【 】。 #includeiostream int main() { using namespace std; int a=true * 2; int b=20; couta+b=a+bendl; } a+b=22 a+b=20 a+b =18 编译错误 2. 以下代码的输出结果是【 】。 #include iostream const char *st = This is a simple.\n; int main() { int len = 0; while ( *st++ ) ++len; std::cout len : st-18 std::endl; return 0; } 18: This is a simple. 18: his is a simple. 18: is is a simple. 编译错

文档评论(0)

1亿VIP精品文档

相关文档