0% found this document useful (0 votes)
7 views4 pages

MCQ on Data Structures and Algorithms

The document contains multiple-choice questions (MCQs) related to data structures and algorithms, with correct answers marked. Key topics include linear data structures, advantages of arrays, string operations, search algorithms, and linked lists. Each question is followed by options, with the correct choice indicated by a checkmark.

Uploaded by

debabir82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

MCQ on Data Structures and Algorithms

The document contains multiple-choice questions (MCQs) related to data structures and algorithms, with correct answers marked. Key topics include linear data structures, advantages of arrays, string operations, search algorithms, and linked lists. Each question is followed by options, with the correct choice indicated by a checkmark.

Uploaded by

debabir82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MCQ Answers with Correct Option Marked

1. Which one of the following is linear data structure?

A) Linked List
B) Array ✓
C) Tree
D) Graph
E) Hash

2. Which of the following is the advantage of the array data structure?

A) Elements of mixed data types can be stored


B) Easier to access the elements in an array ✓
C) Index of the first element starts from 1
D) Elements of an array cannot be sorted
E) Elements of array is difficult to access

3. Which of the following is NOT a common operation on String?

A) Insert
B) Sub string
C) Concatenation
D) Delete
E) Reverse ✓

4. The complexity of linear search algorithm is

A) O(n) ✓
B) O(log2 n)
C) O(n2 )
D) O(n log2 n)
E) O(n/2)

5. String is in data structure.

1
A) a new data type in C
B) an array of characters with null character as the last element of
array ✓
C) an array of characters with null character as the first element of
array
D) an array of integers with 0 as the last element of array
E) an array of special symbols

6. Which of the following is the advantage of the array data structure?

A) Elements of mixed data types can be stored


B) Easier to access the elements in an array ✓
C) Index of the first element starts from 1
D) Elements of an array cannot be sorted
E) Elements of array is difficult to access

7. Which parameter is the best parameter to calculate complexity of an


algorithm?

A) Execution time ✓
B) No of statements
C) Counting Compares
D) No of Elements
E) Program size

8. Which of the following is a condition of binary search?

A) sorted ✓
B) unsorted
C) character type
D) integer type
E) mandatory

9. The complexity of binary search algorithm is

2
A) O(n)
B) O(log2 n) ✓
C) O(n2 )
D) O(n log2 n)
E) O(n/2)

10. Consider an array with 128 sorted elements. How many maximum
comparison will be to find an item into the array using binary search?

A) 2
B) 7 ✓
C) 10
D) 50
E) 128

11. Which of the following is condition of binary search?

A) List should be sorted ✓


B) List should be unsorted
C) List should be character type
D) List should be integer type
E) List should be mandatory

12. Which parameter is the best parameter to calculate complexity of an


algorithm?

A) Execution time ✓
B) No of statements
C) Counting Compares
D) No of Elements
E) Program size

13. Which of the following is most important for linked list?

A) Information is always integer or float

3
B) Link part is always integer pointer
C) One or more information part
D) Link of next part should be the same node type ✓
E) Minimum one information

14. Linked lists are not suitable for the implementation of .

A) Insertion
B) Deletion
C) Polynomial manipulation
D) Binary search ✓
E) Linear search

You might also like