C12A试卷-英文.docVIP

  • 64
  • 0
  • 约 8页
  • 2017-01-06 发布于贵州
  • 举报
浙江大学2012–2013学年冬季学期 《程序设计基础及实验》课程期末考试试卷 课程号:,开课学院: 计算机学院__ 考试试卷:√A卷、B卷(请在选定项上打√) 考试形式:√闭、开卷(请在选定项上打√),允许带 ∕入场 考试日期: 2013 年 01 月 16 日,考试时间: 120 分钟 诚信考试,沉着应考,杜绝违纪. 考生姓名: 学号: 所属院系: _ (注意:答题内容必须写在答题卷上,写在本试题卷上无效) Section 1: Single Choice(2 marks for each item, total 20 marks) The precedence(优先级) of operator _____is the lowest in the followings. A.= B.+ C.!= D.+= _____is the legal character constant in the followings. A.0 B.‘\102’ C.‘12’ D.‘+=’ _____can NOT express the statement ”both x and y are zero”. A.x==0 y==0 B.!x !y C.x==0 || y==0 D.!(x || y) “scanf(%d%c%f, op1, op, op2);”,op1, op and op2 are 1,’*’2.0 each when input_____. A.1.0*2 B.1 * 2 C.1.0*2.0 D.1*2 void f(char ** p),the definition _______of var makes the function call f(var) incorrect. A.char var[10][10]; B.char *var[10]; C.void *var = NULL; D.char *v=NULL, **var=v; fragment, the value of variable m is _______. int m; for( m=0; m9; m++ ) m++; A.8 B.9 C.10 D.11 _______of the followings is equivalent to “while( *s++ = *t++ );”. A. do { *s = *t++; } while ( *s++ ); B. while ( *t ) *s++ = *t++; C. do { *s++ = *t++; } while ( *t ); D. while ( *s ) *s++ = *t++; char s[2][3]={“ab”, “cd”}, *p=(char *)s; the expression _______is correct and its value is equivalent to the element s[1][1]. A.*(s+3) B.*s+2 C.p[1][1] D.*++p+2 Given the definitions: #define type1 char * typedef char *type2; type1 s1, s2; type2 s3, s4; _______are character pointers in the followings. A.s1, s3 B.s1, s2, s3 C.s1, s3, s4 D.s1, s2, s3, s4 For definition: struct { int n; char *str;} *p;,“++” will act on _______in the expression “++p-str”. A.str B.p C.str points to D. Section 2: Fill in the blanks(2 marks for each item, total 30 marks) If the variable x is declared correctly, the value of expression (-10x0) is_____. The following code code fragment will output _____. static int x, y, z; z = (x=1) || (y=2); printf(%d , y); The following program

文档评论(0)

1亿VIP精品文档

相关文档