Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?

A. Deleting a node whose location in given
B. Searching of an unsorted list for a given item
C. Inverting a node after the node with given location
D. Traversing a list to process each node
Answer» B. Searching of an unsorted list for a given item
2.

Depending on what on what can a linked list be classified into various other types?

A. The number of pointers in a node
B. The purpose for which the pointers are maintained
C. Both (a) and (b)
D. None of the above
Answer» D. None of the above
3.

A linked list is a linear collection of homogeneous elements called______.

A. Runtime
B. Nodes
C. Pointers
D. None of the above
Answer» C. Pointers
4.

In a singly-linked list (linear linked list), how many fields does each node consists of?

A. One
B. Three
C. Two
D. Zero
Answer» D. Zero
5.

A collection of data items of similar type arranged in a sequence is termed as?

A. Memory space
B. Static data structure
C. Data structure
D. List
Answer» E.
6.

A variant of the linked list in which none of the node contains NULL pointer is?

A. Singly linked list
B. Doubly linked list
C. Circular linked list
D. None of the above
Answer» D. None of the above
7.

In circular linked list, insertion of node requires modification of?

A. One pointer
B. Two pointer
C. Three pointer
D. Requires no modification
Answer» C. Three pointer
8.

Applications of Linked List are

A. Simulation, event driven systems
B. Postfix and prefix manipulations
C. Dictionary systems, polynomial manipulations
D. Fixed block storage allocation, garbage collection
Answer» E.
9.

Linked lists are not suitable data structures for which one of the following problems?

A. Insertion sort
B. Binary search
C. Radix sort
D. Polynomial manipulation
Answer» C. Radix sort
10.

Which of the following is not a type of Linked List ?

A. Doubly Linked List
B. Singly Linked List
C. Circular Linked List
D. Hybrid Linked List
Answer» E.
11.

Linked list uses

A. Random memory allocation
B. Static memory allocation
C. Fixed memory allocation
D. Dynamic memory allocation
Answer» E.
12.

An ordered sequence of data items are known to be

A. Entities
B. Relations
C. Elements
D. Instances
Answer» D. Instances
13.

To implement Sparse matrix dynamically, the following data structure is used

A. Trees
B. Graphs
C. Priority Queues
D. Linked List
Answer» E.
14.

Direct or random access of elements is not possible in ...............

A. Linked list
B. Array
C. String
D. None of these
Answer» B. Array
15.

What are the time complexities of finding 8th element from beginning and 8th element from end in a singly linked list? Let n be the number of nodes in linked list, you may assume that n>8.

A. O(n) and O(n)
B. O(1) and O(1)
C. O(n) and O(1)
D. O(1) and O(n)
Answer» E.
16.

Generally collection of Nodes is called as __________.

A. Stack
B. Linked List
C. Heap
D. Pointer
Answer» C. Heap
17.

A linear collection of data element given by mean of pointer is called ______________.

A. Linked List
B. Queue
C. Stack
D. Graph
Answer» B. Queue
18.

Which of the following is two way list?

A. grounded header list
B. circular header list
C. linked list with header and trailer nodes
D. none of above
Answer» E.
19.

Time require to find any element of the linked list is _______.

A. O(n)
B. O(1)
C. O(n^2)
D. None of these
Answer» B. O(1)
20.

Consider the following linked list representation. Which of the following statement is used to create a node ?

A. new_node=(struct node *)malloc((struct node));
B. new_node=(struct *)malloc(sizeof(struct node));
C. new_node=(struct node)malloc(sizeof(struct node));
D. new_node=(struct node *)malloc(sizeof(struct node));
Answer» E.
21.

struct node *current = start->nextwhat "current" will contain if it is variable of type struct node ?

A. Address of 2nd Node
B. Address Field of 2nd Node
C. Data Field of 2nd Node
D. None of these
Answer» B. Address Field of 2nd Node
22.

Consider the below representation and predict what will be printed on the screen by following statement ?start->next->data

A. Access the “data” field of 3rd node
B. Access the “data” field of 1st node
C. Access the “data” field of 2nd node
D. None of these
Answer» D. None of these
23.

Consider the Singly linked list having n elements. What will be the time taken to add an node at the end of linked list if Pointer is initially pointing to first node of the list.

A. O(1)
B. O(n-1)
C. O(n)
D. O(n^2)
Answer» C. O(n)
24.

The concatenation of two lists is to be performed in O(1) time. Which of the following implementations of a list could be used ?

A. Array Implementation of List
B. Singly Linked List
C. Circular Doubly Linked List
D. Doubly Linked List
Answer» D. Doubly Linked List
25.

Pointer is pointing to the first element of the Node then time require to Insert Element to second position is __________.

A. O(n)
B. O(1)
C. O(n^2)
D. O(n-1)
Answer» C. O(n^2)
26.

Each Node contain minimum two fields one field called data field to store data. Another field is of type _________.

A. Pointer to Class
B. Pointer to an Integer
C. Pointer to Character
D. Pointer to Node
Answer» E.
27.

Linked list is generally considered as an example of _________ type of memory allocation.

A. Static
B. Dynamic
C. Compile Time
D. None of these
Answer» C. Compile Time
28.

When new element is added in the middle of singly linked list then ________.

A. Only elements that appear after the new element need to be moved
B. Only elements that appear before the new element need to be moved
C. No need to move element
D. Only elements that appear after the new element and before need to be moved
Answer» D. Only elements that appear after the new element and before need to be moved
29.

Which of the following operation is performed more efficiently in doubly linked list ?

A. Inserting a node at given position
B. Deleting a node at given position
C. Searching a node at given position
D. None of these
Answer» C. Searching a node at given position
30.

Linked list data structure usage offers considerable saving in

A. Space utilization
B. Computational time
C. Space utilization & computational time
D. None of the above
Answer» D. None of the above
31.

A doubly linked list performs traversal in _________.

A. Any direction
B. Circular direction
C. Either direction
D. None of the above
Answer» D. None of the above
32.

Consider linked list is used to implement the Stack then which of the following node is considered as Top of the Stack ?

A. Any Node
B. Last Node
C. First Node
D. Middle Node
Answer» D. Middle Node
33.

Consider the following linked list and linked list representation. what will be the value of following statement ?start->next->next->next->data

A. 12
B. 30
C. 15
D. 25
Answer» E.
34.

A linked list in which the last node of Linked list points to the first is called a _________.

A. Doubly Linked List
B. Circular Linked List
C. Singly Linked List
D. None of these
Answer» C. Singly Linked List
35.

The link field in the last node of the linked list contains _________.

A. Link to the first node
B. Zero value
C. Pointer to the next element location
D. None of the above
Answer» C. Pointer to the next element location
36.

If start is pointing to first node of the linked list then consider the following statement -start = start->next;current = start->next;what will be the value of address field of current ?

A. 5571
B. 5572
C. 3225
D. 2184
Answer» B. 5572
37.

In Linked list implementation, a node carries information regarding _______.

A. Link
B. Data
C. Data and Link
D. None of the above
Answer» D. None of the above
38.

Consider the 2-level skip list. How to access 38?

A. travel 20-30-35-38
B. travel 20-30-40-38
C. travel 20-38
D. travel 20-40-38
Answer» B. travel 20-30-40-38
39.

A linear collection of data elements where the linear node is given by means of pointer is called

A. linked list
B. node list
C. primitive list
D. None of these
Answer» B. node list
40.

In Circular Linked List insertion of a node involves the modification of ____ links.

A. 3
B. 4
C. 1
D. 2
Answer» E.
41.

To maintain a linked list in memory, how many parallel arrays of equal size are used?

A. One
B. Two
C. Three
D. Four
Answer» C. Three
42.

In a linked list with n nodes, the time taken to insert an element after an element pointed by some pointer is

A. 0 (1)
B. 0 (log n)
C. 0 (n)
D. 0 (n log n)
Answer» B. 0 (log n)
43.

The last node of the singly-linked list contains__________.

A. Info
B.
C. Next
D. None of the above
Answer» C. Next
44.

To delete a node from the end of a linked list, the list is traversed up to the last ______.

A. Pointer
B. Node
C. List
D. None of the above
Answer» C. List
45.

Since a doubly-linked list allows traversing in both the forward and backward directions, it is also referred to as a___________.

A. Multi-way list
B. One-way list
C. Two-way list
D. None of the above
Answer» D. None of the above
46.

Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer?

A. O (1)
B. O (log n)
C. O (n)
D. O (n log n)
Answer» B. O (log n)
47.

Overflow condition in linked list may occur when attempting to .............

A. Create a node when free space pool is empty
B. Traverse the nodes when free space pool is empty
C. Create a node when linked list is empty
D. None of these
Answer» B. Traverse the nodes when free space pool is empty
48.

Searching a value (say, item) in a linked list means finding the position of the node, which stores ___________ as its value?

A. node
B. item
C. info
D. None of the above
Answer» C. info
49.

If a list contains no elements it is said to be

A. Hollow
B. Empty
C. Finite
D. Infinite
Answer» C. Finite
50.

_________a list means accessing its elements one by one to process all or some of the elements.

A. Traversing
B. Creating
C. Linking
D. None of the above
Answer» B. Creating