# General knowledge MCQs With Answers

## Top 50+ General knowledge MCQsWith Answers

Today we are going to talk in this article, we will see a few general knowledge questions, so this question is going to be very important for you people. We have to see what kind of question is coming, then we will teach you people here that how you mean you people should come to general knowledge in a very genuine way and we will tell you the general knowledge that will be general knowledge. How do questions come in big exams, so let’s see friends, general knowledge will help very well

Friends, if you people want the answer of this general knowledge question, then you can comment us and below this we will give you the complete things to you people in pdf.pdf format and from where you guys can see.

General Knowledge MC is made from the very best moon and we have taken a lot of time to make this question, it is a general knowledge question. If you can keep music, then let’s see friends, what is the meaning of today’s question, what is the general knowledge question, whatever the training question answer.

## Abstract Data Types MCQs

#### 1. Which of the following abstract data types can be used to represent a many to many relation?

(A) Tree

(B) Plex

(C) Graph

(D) Both (b) and (c)

Answer: Both (b) and (c)

#### 2. An algorithm is made up of 2 modules M1&M2. If order of M1 is f(n) & M2 is g(n) then the order of algorithm is?

(A) max (f(n),g(n))

(B) min (f(n),g(n))

(C) f(n) + g(n)

(D) f(n) X g(n)

#### 3. Which of these best describes an array?

(A) A data structure that shows a hierarchical behaviour

(B) Container of objects of similar types

(C) Arrays are immutable once initialised

(D) Array is not a data structure

Answer: Container of objects of similar types

#### 4. How do you initialize an array in C?

(A) int arr = (1,2,3);

(B) int arr(3) = {1,2,3};

(C) int arr = {1,2,3};

(D) int arr(3) = (1,2,3);

Answer: int arr = {1,2,3};

#### 5. How do you instantiate an array in Java?

(A) int arr[] = new int(3);

(B) int arr[];

(C) int arr[] = new int;

(D) int arr() = new int(3);

Answer: int arr[] = new int;

(A) int[] arr;

(B) int arr[[]];

(C) int[][]arr;

(D) int[[]] arr;

(A) 0

(B) -1

(C) 2

(D) 1

#### 8. Elements in an array are accessed _____________

(A) randomly

(B) sequentially

(C) exponentially

(D) logarithmically

#### 9. When does the ArrayIndexOutOfBoundsException occur?

(A) Compile-time

(B) Run-time

(C) Not an error

(D) Not an exception at all

#### 10. What will be the minimum number of jumps required to reach the end of the array arr[] = {1,2,0,0,3,6,8,5}?

a) 1

b) 2

c) 3

d) not possible to reach the end

Answer: not possible to reach the end

a) true

b) false

a) 1

b) 2

c) 3

d) 4

a) true

b) false

a) O(n)

b) O(n2)

c) O(n3/2)

d) O (1)

#### 15. What will be the minimum number of jumps required to reach the end of the array arr[] = {1,3,6,3,6,8,5}?

a) 1

b) 2

c) 3

d) not possible to reach the end

#### 16. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) Insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the last node of the linked list

(A) I and II

(B) I and III

(C) I, II and III

(D) I, II and IV

Answer: I, II and III

#### 17. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) Insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the last node of the linked list

(A) I and II

(B) I and III

(C) I, II and III

(D) I, II and IV

Answer: I and III

#### 18. Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a head pointer and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) Insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the end node of the linked list

(A) I and II

(B) I and III

(C) I, II and III

(D) I, II, III and IV

Answer: I, II, III and IV

#### 19. Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) Insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the end node of the linked list

(A) I and II

(B) I and III

(C) I, II and III

(D) I, II, III and IV

Answer: I and III

#### 20. Consider an implementation of unsorted circular linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) Insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the end node of the linked list

(A) I and II

(B) I and III

(C) I, II, III and IV

(D) None

#### 21. Consider an implementation of unsorted circular doubly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?

i) Insertion at the front of the linked list

ii) insertion at the end of the linked list

iii) Deletion of the front node of the linked list

iv) Deletion of the end node of the linked list

(A) I and II

(B) I and III

(C) I, II and III

(D) I, II, III and IV

Answer: I, II, III and IV

#### 22. In a linked list each node contains a minimum of two fields. One field is the data field to store the data second field is?

(A) Pointer to character

(B) Pointer to integer

(C) Pointer to node

(D) Node

Answer: Pointer to node

(A) O (1)

(B) O (n)

(C) θ (n)

(D) θ (1)

(A) O (1)

(B) O (n)

(C) O (n2)

(D) None

(A) O (1)

(B) O (n)

(C) O (n2)

(D) None

#### 26. What are the applications of dequeue?

a) A-Steal job scheduling algorithm

b) Can be used as both stack and queue

c) To find the maximum of all subarrays of size k

d) To avoid collision in hash tables

Answer: To avoid collision in hash tables

#### 27. After performing these sets of operations, what does the final list look to contain?

``````                        InsertFront(10);
InsertFront(20);
InsertRear(30);
DeleteFront();
InsertRear(40);
InsertRear(10);
DeleteRear();
InsertRear(15);
display();``````

a) 10 30 10 15

b) 20 30 40 15

c) 20 30 40 10

d) 10 30 40 15

Answer: 10 30 40 15

a) O(nlogn)

b) O(logn)

c) O(n)

d) O(n2)

#### 29. What is a memory efficient double linked list?

a) Each node has only one pointer to traverse the list back and forth

b) The list has breakpoints for faster traversal

c) An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list

d) A doubly linked list that uses bitwise AND operator for storing addresses

Answer: Each node has only one pointer to traverse the list back and forth

#### 30. What is a memory-efficient double linked list?

a) Each node has only one pointer to traverse the list back and forth

b) The list has breakpoints for faster traversal

c) An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list

d) A doubly linked list that uses bitwise AND operator for storing addresses

Answer: Each node has only one pointer to traverse the list back and forth

#### 31. How do you calculate the pointer difference in a memory-efficient double linked list?

a) head xor tail

b) pointer to previous node xor pointer to next node

c) pointer to previous node – pointer to next node

d) pointer to next node – pointer to the previous node

Answer: pointer to previous node xor pointer to next node

a) O(nlogn)

b) O(logn)

c) O(n)

d) O(n2)

#### 33. What is not a disadvantage of priority scheduling in operating systems?

a) A low priority process might have to wait indefinitely for the CPU

b) If the system crashes, the low priority systems may be lost permanently

c) Interrupt handling

d) Indefinite blocking

#### 34. Which of the following is not an advantage of a priority queue?

a) Easy to implement

b) Processes with different priority can be efficiently handled

c) Applications with differing requirements

d) Easy to delete elements in any case

Answer: Easy to delete elements in any case

a) O(nlogn)

b) O(logn)

c) O(n)

d) O(n2)

#### 36. A queue is a?

a) FIFO (First In First Out) list

b) LIFO (Last In First Out) list.

c) Ordered array

d) Linear tree

Answer: FIFO (First In First Out) list

a) Stack

b) Queue

d) None

a) ABCD

b) DCBA

c) DCAB

d) ABCD

#### 39. In linked list implementation of a queue, where does a new element be inserted?

a) At the head of link list

b) At the tail of the link list

c) At the centre position in the link list

d) None

Answer: At the tail of the link list

#### 40. In the array implementation of circular queue, which of the following operation take worst-case linear time?

a) Insertion

b) Deletion

c) To empty a queue

d) None

#### 41. In linked list implementation of queue, if the only front pointer is maintained, which of the following operation take worst-case linear time?

a) Insertion

b) Deletion

c) To empty a queue

d) Both a) and c)

Answer: Both a) and c)

#### 42. If the MAX_SIZE is the size of the array used in the implementation of a circular queue. How is the rear manipulated while inserting an element in the queue?

a) rear=(rear%1)+MAX_SIZE

b) rear=rear%(MAX_SIZE+1)

c) rear=(rear+1)%MAX_SIZE

d) rear=rear+(1%MAX_SIZE)

#### 43. In a circular queue, how do you increment the rear end of the queue?

a) rear++

b) (rear+1) % CAPACITY

c) (rear % CAPACITY)+1

d) rear–

Answer: (rear+1) % CAPACITY

#### 44. What is the term for inserting into a full queue known?

a) overflow

b) underflow

c) null pointer exception

d) program won’t be compiled

a) O(logn)

b) O(nlogn)

c) O(n)

d) O(1)

#### 46. What is the need for a circular queue?

a) effective usage of memory

b) easier computations

c) to delete elements based on priority

d) implement LIFO principle in queues

Answer: effective usage of memory

#### 47. In linked list implementation of a queue, where does a new element be inserted?

a) At the head of link list

b) At the centre position in the link list

c) At the tail of the link list

d) At any position in the linked list

Answer: At the tail of the link list

#### 48. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?

a) Only front pointer

b) Only rear pointer

c) Both front and rear pointer

d) No pointer will be changed

Answer: Only rear pointer

#### 49. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into the EMPTY queue?

a) Only front pointer

b) Only rear pointer

c) Both front and rear pointer

d) No pointer will be changed

Answer: Both front and rear pointer

a) AVAIL

b) FRONT

c) REAR

d) NULL

#### 51. In linked list implementation of a queue, from where is the item deleted?

a) At the head of the link list

b) At the center position in the link list

c) At the tail of the link list

d) Node before the tail

#### 52. In linked list implementation of a queue, the important condition for a queue to be empty is?

a) FRONT is null

b) REAR is null

c) LINK is empty

d) FRONT==REAR-1

Answer: FRONT is null

a) Underflow

b) Overflow

c) Front value

d) Rear value

#### 54. Consider you have a stack whose elements in it are as follows.

5 4 3 2 << top
Where the top element is 2.
You need to get the following stack
6 5 4 3 2 << top

The operations that needed to be performed are (You can perform only push and pop):

a) Push(pop()), push(6), push(pop())

b) Push(pop()), push(6)

c) Push(pop()), push(pop()), push(6)

d) Push(6)

Answer: Push(pop()), push(6), push(pop())

#### 55. A double-ended queue supports operations like adding and removing items from both the sides of the queue. They support four operations like addFront (adding item to top of the queue), addRear (adding item to the bottom of the queue), removeFront (removing item from the top of the queue) and removeRear (removing item from the bottom of the queue). You are given only stacks to implement this data structure. You can implement only push and pop operations. What’s the time complexity of performing addFront and addRear? (Assume ‘m’ to be the size of the stack and ‘n’ to be the number of elements)

a) O(m) and O(n)

b) O(1) and O(n)

c) O(n) and O(1)

d) O(n) and O(m)

Answer: O(1) and O(n)

#### 56. Why is the implementation of stack operations on queues not feasible for a large dataset (Assume the number of elements in the stack to be n)?

a) Because of its time complexity O(n)

b) Because of its time complexity O(log(n))

c) Extra memory is not required

d) There are no problems

Answer: Because of its time complexity O(n)

a) 20

b) 40

c) 42

d) 43

#### 58. You have two jars, one jar which has 10 rings and the other has none. They are placed one above the other. You want to remove the last ring in the jar. And the second jar is weak and cannot be used to store rings for a long time.

a) Empty the first jar by removing it one by one from the first jar and placing it into the second jar

b) Empty the first jar by removing it one by one from the first jar and placing it into the second jar and empty the second jar by placing all the rings into the first jar one by one

c) There exists no possible way to do this

d) Break the jar and remove the last one

Answer: Empty the first jar by removing it one by one from the first jar and placing it into the second jar and empty the second jar by placing all the rings into the first jar one by one

a) Push

b) Pop

c) Enqueue

d) Returntop

a) Once

b) Twice

c) Thrice

d) Four times

#### 61. What is the time complexity of inserting at the end in dynamic arrays?

a) O(1)

b) O(n)

c) O(logn)

d) Either O(1) or O(n)

Answer: Either O(1) or O(n)

a) O(1)

b) O(n)

c) O(logn)

d) O(n2)

#### 63. What is the space complexity for deleting a linked list?

a) O(1)

b) O(n)

c) Either O(1) or O(n)

d) O(logn)

#### 64. Which of these is not an application of a linked list?

a) To implement file systems

b) For separate chaining in hash-tables

c) To implement non-binary trees

d) Random Access of elements

a) O(1)

b) O(n)

c) θ(n)

d) θ(1)

a) O(1)

b) O(n)

c) O(n2)

d) O(n3)

a) O(1)

b) O(n)

c) O(n2)

d) O(n4)

a) O(1)

b) O(n)

c) O(n2)

d) O(n3)

#### 69. The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?

a) Singly linked list

b) Doubly linked list

c) Circular doubly linked list

d) Array implementation of list

#### 70. In a stack, if a user tries to remove an element from an empty stack it is called _________

a) Underflow

b) Empty collection

c) Overflow

d) Garbage Collection

a) Overflow

b) Crash

c) Underflow

d) User flow

#### 72. Entries in a stack are “ordered”. What is the meaning of this statement?

a) A collection of stacks is sortable

b) Stack entries may be compared with the ‘<‘ operation

c) The entries are stored in a linked list

d) There is a Sequential entry that is one by one

Answer: There is a Sequential entry that is one by one

#### 73. Which of the following is not the application of stack?

a) A parentheses balancing program

b) Tracking of local variables at run time

c) Compiler Syntax Analyzer

d) Data Transfer between two asynchronous process

Answer: Data Transfer between two asynchronous process

a) 1

b) 2

c) 3

d) 4 or more

a) O(1)

b) O(n)

c) O(logn)

d) O(nlogn)

a) S[N-1]

b) S[N]

c) S

d) S

#### 77. What happens when you pop from an empty stack while implementing using the Stack ADT in Java?

a) Undefined error

b) Compiler displays a warning

c) EmptyStackException is thrown

d) NoStackException is thrown

Answer: EmptyStackException is thrown

#### 78. Array implementation of Stack is not dynamic, which of the following statements supports this argument?

a) space allocation for the array is fixed and cannot be changed during run-time

b) user unable to give the input for stack operations

c) a runtime exception halts execution

d) improper program compilation

Answer: space allocation for the array is fixed and cannot be changed during run-time

#### 79. What does ‘stack overflow’ refer to?

a) accessing items from an undefined stack

b) adding items to a full-stack

c) removing items from an empty stack

d) index out of bounds exception

#### 80. Which of the following data structures can be used for parentheses matching?

a) n-ary tree

b) queue

c) priority queue

d) stack

a) 3

b) 4

c) 1

d) 2

a) Queue

b) Stack

c) Both

d) None

a) Stack

b) Queue

c) Both

d) Binary Tree

a) 1

b) 2

c) 3

d) 4