哈工大C语言2008秋试题xueyr.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
本次考试为开卷考试,卷面100分,折合为50分计入期末成绩。如此卷为补考试卷,则按卷面分数记入补考成绩。 如无特殊说明,所有题目都针对标准C,并假设运行环境是32位的x86计算机,Windows XP操作系统。 一、单项选择题(共10分,每小题2分) 下列不是C语言的关键字的是: ( ) A. B. free C. signed D. auto 下列说法中 ( ) A. . 决定如何解释内存中的位 C. 决定数据可以执行的运算 D. 决定以何种方式输出数据 与if(x)等价的语句是: ( ) A. if() B. if(x == 0) C. if(x != 1) D. if(x) 关于的下列说法正确的是 ( ) A. B. 函数可以有多个返回值 C. 函数调用时将实参的值赋给形参 D. 函数可以返回其内部变量的地址 已知: struct{ int data; struct Node *next; } a, b; 则正确的为: ( ) A. B. a-next = b C. a-next = b D. a.next = b 二、写出程序的执行结果(分) 写出下面程序的执行结果。 #include stdio.h main() { printf(%d, (1 - (10 + 8/6) * 7 % 4 * 4) / 3); } 假设输入为“Good boy,go on!”,写出下面程序的执行结果。 #include stdio.h main() { char ch; scanf(%c, ch); for(ch = $; ch != g; scanf(%c, ch)) putchar(ch); } 写出下面程序的执行结果。 #include stdio.h main() { for(k = 1, printf(%d: Hi!\n, k); printf(k = %d\n, k), k * k 18; k += 2, printf(Now k is %d\n, k)) printf(k is %d in the loop\n, k); } 写出下面程序的执行结果。 #include stdio.h #define (A,B) ( A B ) ? A : B main() { printf(%d\n, MAX(12+3, 3*4) + 5); } 写出下面程序的执行结果。 #include stdio.h main() { int i = 20; while(i++ = 65) { if(i % 20 == 0) printf(%d div 20\n, i); if(i = 65) printf(%d, end\n, i); } } 写出下面程序的执行结果。 #include stdio.h main() { int a = 3, b = 2, c = 1; if(a b) if(a c) printf(%d\n, a); else printf(%d\n, b); else printf(%d\n, c); } 写出下面程序的执行结果。 #include stdio.h int a[100]; void func(int b[100]) { printf(%d\n, sizeof(a)); } main() { printf(%d\n, sizeof(a)); func(a); } 写出下面程序的执行结果。 #include stdio.h #include string.h main() { char food[] = Bread; char *p; p = food + strlen(food); while(--p = food) puts(p); } 写出下面程序的执行结果。 #include stdio.h struct tree { int x; int y; } t; void func(struct tree t) { t.x = 10; t.y = 20; } main() { t.x = 1; t.y = 2; func(t); printf(%d %d\n, t.x, t.y); } 写出下面程序的执行结果。 #include stdio.h char *p; for(p = str; *p != \0; p++) { if(*p ==

文档评论(0)

企业资源 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档