没有合适的资源?快使用搜索试试~ 我知道了~
试卷-A-final1
需积分: 0 0 下载量 5 浏览量
2022-08-03
12:19:01
上传
评论
收藏 422KB PDF 举报
温馨提示
试读
6页
A) A local variable will be automatically initialized to zero if no initial valu
资源详情
资源评论
资源推荐
1
《中山大学授予学士学位工作细则》第六条
考 试 作 弊 不 授 予 学 士 学 位
计 算 机 科 学 系 2012 第 一 学期
《 程 序 设 计 I 》 期 末 考试试 题 ( A )
任课教师:吴维刚 刘聪 刘晓铭 考试形式:闭卷 考试时间: 2 小 时
年级:12 班别: 1、2、3 专业: 计算机 姓名: 学号: 成绩
1. Single Choice (20points). Please choose the best answer for each question.
1) Which of the following statements about C++ is correct?
A) C++ is a subset of C.
B) C++ is developed based on Java.
C) Any C++ program can be replaced by a C program with equivalent functionality.
D) C++ is the best programming language.
2) Which of the following is a valid user-defined identifier?
A) _x B) 9X C) x# D) else
3) What is of the following is not a basic flow control structure?
A) Sequence B) Jump C) Selection D) Loop
4) Which of the following math expression is correct?
A) 4x+x B) (x-4)/2(x-5) C) ++(2.0/9+x) D) x+=(x+1)
5) Suppose char x = ‘9’, what is the printout of cout << x+1<<endl ?
A) 0 B) 58 C) 10 D) A
6) Which of the following expression exactly equals to -- i ?
A) i-- B) i+=1 C) ++i D) i=i-1
7) Suppose x is a variable of int, which of the following is a meaningful boolean expression?
A) 1 < x < 100 B) x = 0 C) x D) (x = 1) || (x != 1)
8) Which of the following cannot store the string "Good" correctly?
A) char text[] = "Good"; B) char text[] = {'G', 'o', 'o', 'd'}
C) char text[5] = {'G', 'o', 'o', 'd'}; D) char text[] = {'G', 'o', 'o', 'd', ‘