(完整版)C语言英文试题.docVIP

  • 3
  • 0
  • 约3.7千字
  • 约 3页
  • 2023-04-30 发布于湖北
  • 举报
2009-2010 学年 1 学期 C 语言程序设计 (C) 课程考试试题 拟题学院(系) : 信息科学与技术学院 拟题人 : 适 用 专 业: 信息 08 级,通信 08 级 校对人 : (答案写在答题纸上,写在试题纸上无效) .Choose the right answer (30 marks) . Determine the output of the following statement: printf(%d, M - N); A) M - N B) M - N B) 3 D) 1 Which of following is an illegal user-define symbol? A) scanf B) _123 C)C$ D)var Which statement is not a C statement? C) {int a; a++;} B) z = 20, a += c; C) ; D) { ; } 4. Which operator can only be applied to integers? A) %= B) / C) = D) = Determine the output of the following program. void main() { int y=8,x=7; printf(%d %d\n, ++x, y++); } A) 7,8 B) 9,7 C) 8,8 D) 8,9 6. Choose the wrong definition for the character strings. A) char str[4]= “QUST ”; B) char str[]= “QUST ”; C) char *str= “QUST ”; D) char str[]={ Q’‘,U ’‘,S’‘,T’,‘‘\0’ }; 7. Determine the output of the following program. void main() { int i, j, m = 0; for(i=1 ; i=15 ; i+=5) for(j=3 ; j=19 ;j+=3) 1 m++; } printf(%d\n,m); A) 12 B) 15 C) 18 D) 25 For the 2-dimensional array int b[][3]={{1,0,-1},{10,12},{8,3,9},{0}}; the value for the b[2][1] is______. A) 8 B) 5 C)3 D) 12 9. In the statement while(x), choose the equivalent expression for the x. A)x==0 B)x==1 C)x!=1 D) x!=0 10. For the following codes: int z=5, *p=z; the value of the *p is_______. A) the address of c B)unknown value C)the address of p D)5 In order to assign 45 to variant a and assign 64 to variant b with the statement scanf(“%d%d ”, a, b), which input format is correct? A) 45 64 B) 45, 64 C) 45;64 D) 4564 12. What is the byte length of the string “\t\\abcd”. A) 6 B) 7 C) 8 D) 9 Determine the output of the value of b. Int a[4][2] = {1,2,3,4,5,6,7,8}; b = *(*(a + 2) + 1); A) 3 B) 4 C) 5 D) 6 Determine the output of the following program: main() { int n = 8; while (n 5) { n--; printf( “%d”, n); } } A) 876 B) 765 C) 8765 D) 7654 15. What is the functionality of function “rewind ”? A) open the file again; 2 return the length of the file push the pointer to the end of the file push the pointer to

文档评论(0)

1亿VIP精品文档

相关文档