0

Data Structure

Description: This test consist of computer basic questions.
Number of Questions: 20
Created by:
Tags: Data Structures Algorithm Data Structure
Attempted 0/20 Correct 0 Score 0

Stack is an example of

  1. static data structure

  2. complex data structure

  3. global data structure

  4. built-in data structure

  5. both (1) and (2)


Correct Option: A
Explanation:

Stack is not a static data structure.

Which of the following data items may lead to a variable length records when included as items in a record?

(a) Age (b) Sex (c) Name of the Spouse (d) Names of the Children (e) Father Name

  1. Age

  2. Sex

  3. Name of the Spouse

  4. Names of the Children

  5. Father Name


Correct Option: D
Explanation:

As a person may have many children. This is a variable length record.

The operation accessing each record exactly once, so that certain items in the record may be processed is called

  1. Traversing

  2. Sorting

  3. Searching

  4. Merging

  5. Finding


Correct Option: A
Explanation:

Traversing is the correct answer.

Reverse polish notation for the expression (4 + 2 * 5) / (1 + 3 * 2) will be

  1. () + - / 425123

  2. (425132) / + -

  3. 4 2 5 * + 1 3 2 * + /

  4. 425 + - / 132

  5. None of these


Correct Option: C
Explanation:

Reverse polish notation is a mathematical notation in which every operator follows all of its operands.

A teacher keeps the class record containing the following data for each student: Name, Marks, Admission number, Final grades, Hobbies.

Which of these can be set as the primary key?

  1. Name

  2. Marks

  3. Admission number

  4. Final grades

  5. Hobbies


Correct Option: C
Explanation:

Admission number is always unique. Thus, this is the correct answer.

What is the complexity of 'Quick sort' in the worst case?

  1. O(n2)

  2. nlogn

  3. O(n)

  4. O(nlogn)

  5. n


Correct Option: A
Explanation:

This is the right answer.

Which of the following algorithms does not have the same complexity for the worst case and the average case?

  1. Bubble Sort

  2. Quick Sort

  3. Heap Sort

  4. Insert Sort

  5. Selection sort


Correct Option: B
Explanation:

In the worst case,  O(n2)In average case O(nlogn).

What are sparse matrices?

  1. Matrices with a relatively high proportion of zero entries

  2. Matrices with a relatively high proportion of non-zero entries

  3. Matrices with a relatively high proportion of 1's

  4. Matrices with a relatively high proportion of negative entries

  5. Matrices with all zero entries


Correct Option: A
Explanation:

Matrices with a relatively high proportion of zero entries are called sparse matrices.

What is the limitation of binary search?

  1. List must be unsorted

  2. Direct access to the middle element

  3. Direct access to the first element

  4. Direct access to the last element

  5. None of these


Correct Option: B
Explanation:

This is the limitation of binary search.

Persons standing in a line and waiting for the bus is a good example of

  1. stack

  2. queue

  3. linked list

  4. graph

  5. tree


Correct Option: B
Explanation:

This is a good example of queue.

Which of the following is not a data structure operation?

  1. Traversing

  2. Insertion

  3. Removing

  4. Searching

  5. Merging


Correct Option: C
Explanation:

This is not a valid operation.

Which of the following cannot be a primary key?

  1. Serial number

  2. EMPID

  3. Roll number

  4. Salary

  5. PAN number


Correct Option: D
Explanation:

Salary may be same for more than two employees. Hence, it cannot be a primary key

Which of the following is an example of a STACK?

  1. Quick Sort

  2. Merge Sort

  3. Bubble Sort

  4. Heap Sort

  5. None of these


Correct Option: A
Explanation:

This is correct.

A variable whose length may vary during the execution of the program as long as the length does not exceed a maximum value determined by a program before it is executed is called

  1. semi-static

  2. static

  3. semi-dynamic

  4. dynamic

  5. None of these


Correct Option: A
Explanation:

This is the right answer.

A header list where the last node contains a null pointer is called

  1. Zero Header List

  2. Empty Header List

  3. Header less List

  4. Grounded Header List

  5. Null Header List


Correct Option: D
Explanation:

This is the right choice.

Complexity of merg sort in the worst case is

  1. n

  2. nlogn

  3. O(nlogn)

  4. O(n)

  5. None of these


Correct Option: C
Explanation:

In computer science, merge sort (also commonly spelled merge sort) is an O(n log n) comparison-based sorting algorithm.

Which of the following is not a valid string operation?

  1. Substring

  2. Indexing

  3. Concatenate

  4. Length

  5. Join


Correct Option: E
Explanation:

Join is not a valid string operation.

A data structure that reflects a hierarchical relationship between various elements is called a/an

  1. Stack

  2. Queue

  3. Arrays

  4. Linked List

  5. Tree


Correct Option: E
Explanation:

This is the right answer.

A linear list in which elements can be added or removed at either end, but not in the middle is called

  1. Queue

  2. dqueue

  3. Linked List

  4. Stack

  5. Tree


Correct Option: B
Explanation:

This is the correct answer.

Which of the following statements is false?

  1. In a queue, deletion takes place at the front.

  2. In a queue, insertion takes place at the rear.

  3. Queue is also called LIFO.

  4. Queue is also called FIFO.

  5. In a queue, insertion and deletion can take place at both the ends.


Correct Option: C
Explanation:

Queue is FIRST IN FIRST OUT. Therefore, this is a false statement.

- Hide questions