第一章 单元测试

1、 问题:

The algorithm and flowchart can help us to

选项:
A:To know the memory capacity
B:Identify the data type of a variable
C:To store the data
D:Specify the problem completely and clearly
答案: 【
Specify the problem completely and clearly

2、 问题:

 The rhombus or diamond shape in flowcharting denotes

选项:
A:Decision
B:Initialization
C:Input
D:Output
答案: 【
Decision

3、 问题:

Which of the following is not an advantage of a flowchart?

选项:
A:Better communication
B:Efficient coding
C:Systematic testing
D:Improper documentation
答案: 【
Improper documentation

4、 问题:

The flowchart symbols used for start and stop operations are called as_.

选项:
A:decision
B:processing
C:terminals
D:connectors
答案: 【
terminals

5、 问题:

The formula Fn = Fn-1+Fn-2  will produce

选项:
A:Prime Number
B:Euler Number
C:Ramanujan Number
D:Fibonacci Number
答案: 【
Fibonacci Number

6、 问题:

The main measures for the efficiency of an algorithm are

选项:
A:Processor and memory
B:Complexity and capacity
C:Time and space
D:Data and space
答案: 【
Time and space

7、 问题:

Which one of the following is the constant time complexity in terms of Big-Oh notation

选项:
A:O(n)
B:O(n2)
C:O(1)
D:O(n3)
答案: 【
O(1)

8、 问题:

What is the time complexity of the following code?

       int a=0;

    for(i=0;i<n;i++){

        for(j=n;j>i;j–){

            a=a+i+j;}}

选项:
A:O(n)
B:O(nlogn)
C:O(1)
D:O(n2)
答案: 【
O(n2)

9、 问题:

Which one of the following is an example for exponential time complexity?

选项:
A:O(n)
B:O(2n)
C:O(1)
D:O(n2)
答案: 【
O(2n)

10、 问题:

 For larger values of n, which one represents the slowest time?

选项:
A:O(n)
B:O(2n)
C:O(n!)
D:O(n2)
答案: 【
O(n!)

第二章 单元测试

1、 问题:

Deletion of an element from the array reduces the size of array by _____.

选项:
A:one
B:two
C:three
D:zero
答案: 【
one

2、 问题:

Assuming that int is of 4 bytes, what is the size of int arr[10];?

选项:
A:10
B:20
C:30
D:40
答案: 【
40

3、 问题:

Two dimensional arrays are useful when the elements being processed are to be arranged in the form of _____.

选项:
A:rows
B:columns
C:Both (a) and (b)
D:None of the above
答案: 【
Both (a) and (b)

4、 问题:

 In the polynomial,  A(x)= 3x2+2x+4, the degree of this polynomial is

选项:
A:0
B:1
C:2
D:3
答案: 【
2

5、 问题:

 In the polynomial,  A(x)= 3x2+2x+4, coefficient of first term is

选项:
A:0
B:1
C:2
D:3
答案: 【
3

6、 问题:

A matrix having a larger number of elements with zero values than the number of non-zero elements is said to be a_______.

选项:
A:    diagonal matrix
B:    sparse matrix
C:    triangular matrix
D:    zero matrix
答案: 【
    sparse matrix

7、 问题:

 While representing the sparse matrix A (m×n) with t non-zero terms in 3-tuples form, the size of the matrix becomes

选项:
A:m × n
B:t × n
C:(t+1) × 3
D:3 × t
答案: 【
(t+1) × 3

8、 问题:

Considering a sparse of m×n matrix with t non-zero terms, in FAST_TRANSPOSE algorithm, the size of one-dimensional array (S or T) is equal to:

选项:
A:n
B:t
C:m
D:n+t
答案: 【
n

9、 问题:

Considering a sparse of m×n matrix with t non-zero terms, the time complexity of TRANSPOSE algorithm is:

选项:
A:O(nt)
B:O(n-t)
C:O(nt)
D:O(n+t)
答案: 【
O(n
t)

10、 问题:

Which of the following statement is true regarding TRANSPOSE and FAST_TRANSPOSE algorithms.

选项:
A:

The TRANSPOSE algorithm is faster than FAST_TRANSPOSE

B:The TRANSPOSE algorithm is slower than FAST_TRANSPOSE
C:

Time complexities of TRANSPOSE and FAST_TRANSPOSE are same

D:None of the above
答案: 【
The TRANSPOSE algorithm is slower than FAST_TRANSPOSE

第三章 单元测试

1、 问题:

The element is inserted first and will be removed last in  _______.

选项:
A:   queue
B:   stack
C:   linked list
D:   none of the above
答案: 【
   stack

本门课程剩余章节答案为付费内容
本文章不含期末不含主观题!!
本文章不含期末不含主观题!!
支付后可长期查看
有疑问请添加客服QQ 2356025045反馈
如遇卡顿看不了请换个浏览器即可打开
请看清楚了再购买哦,电子资源购买后不支持退款哦

   

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注