Correct answer is (d)
4. Lines at a store, file cabinets, and bookcases are real-world entities that most resemble _____ in computer science.
(a) data structures
(b) functional programming languages
(c) object-oriented programming languages
(d) algorithms
Correct answer is (a)
SSD5 选择题 Multiple-Choice Quiz 6 答案
2010-10-08 21:21
1. Which of the following is the main reason for using recursion?
(a) To use less memory
(b) To avoid templates and inheritance
(c) To improve efficiency
(d) To obtain short, elegant solutions
Correct answer is (d)
2. Consider the following definition of a recursive function f.
int f( int x )
{
if( x == 0 ) return 1;
return x * f( x );
}
For which inputs x will the call f(x) terminate?
(a) For x = 0 only
(b) For all even inputs x only
(c) For all odd inputs x only
(d) For all inputs x
Correct answer is (a)
3. Consider the following definition of a recursive function ff in C++.
int ff( int n, int m )
{
if( n == 0 ) return 0;
return ff( n - 1, m ) + m;
}
Which of the following characterizes the value returned by the call f(n,m)?
(a) The least common multiple(最小公倍数) of m and n
(b) The product of m and n
(c) The greatest common divisor(最大公约数) of m and n
数据结构试题库集及答案_IT认证_资格考试/认证_教育专区。数据结构试题库及答案 第一章 概论一、选择题 1、研究数据结构就是研究( D )。 A. 数据的逻辑结构 ...
第一章 概论一、选择题 1、研究数据结构就是研究( D )。 A. 数据的逻辑结构 B. 数据的存储结构 C. 数据的逻辑结构和存储结构 D. 数据的逻辑结构、存储...
数据结构试题库答案 隐藏>> 数据结构试题及答案 一、单项选择题 (1) 一个算法应该是( A) 程序 C) 要满足五个基本属性 (2) 算法指的是( A) 计算机程序 ...
数据结构试题库答案_理学_高等教育_教育专区。一些试题数据结构试题及答案一、单项选择题 (1) 一个算法应该是( A) 程序 C) 要满足五个基本属性 (2) 算法指的...
数据结构试题库_工学_高等教育_教育专区。数据结构一、选择题 1.采用折半查找方法进行查找,数据文件应为( A.有序表 顺序存储结构 C.随机表 顺序存储结构 2.算法...
线性,树,图 3.数据结构 S 中:元素的集合为:{A,B,C,D,E,F,G,H,I},关系的集合为:{<A,B>, <A,C>, <B,D>, <B,E>, <B,F>, <C,G>, ...
数据结构试题库及答案_工学_高等教育_教育专区。数据结构试题库及答案一、单选题(每题 2 分,共 20 分) 1.栈和队列的共同特点是( A )。 A.只允许在端点处...
数据结构题库 数据结构题数据结构题隐藏>> 第一章 绪论 一、选择题 1、数据结构是一门研究非数值计算的程序设计问题中计算机的 ① A、数据元素 ② A、结构 B...
数据结构题库数据结构题库隐藏>> 第1 章 绪论一、选择题 1. 算法的计算量的大小称为计算的( )。 A.效率 B. 复杂性 C. 现实性 D. 难度 2. 算法的时间...
热门文档