1 ST 2 ND Ans
1 ST 2 ND Ans
1 ST 2 ND Ans
a) Sets of values
d) Programming languages
Answer: b) Sets of associations or relationships involving elements
8. If the water level of a water tank is equal to 0, the isEmpty() method will:
a) Return true
b) Return false
c) Throw an error
d) Do nothing
Answer: a) Return true
a) An observer operation
b) A destructor
c) A creator
d) A transformer
Answer: d) A transformer
a) A destructor
b) A creator
c) An observer
d) A transformer
Answer: a) A destructor
12. After a POP operation on a stack, what happens to the topmost item?
c) Circular structure
d) Sequential processing
Answer: b) Last-in, First-out (LIFO)
d) Nothing happens
Answer: a) The topmost element is deleted
18. What kind of data structures are general and binary trees?
a) Linear data structures
d) Unstructured data
Answer: b) Hierarchical data structures
d) No child nodes
Answer: a) At least three child nodes
a) 1-to-1
b) 1-to-many
c) Many-to-many
d) No relationship
Answer: b) 1-to-many
d) Its value
Answer: c) Its location in memory
a) Arrays
b) Integers
c) Structures
d) Pointers
Answer: b) Integers
a) Sequentially
b) Randomly
c) Recursively
33. Which of the following is the correct way to declare an array in Java?
c) int array[5];
34. For sorting small arrays, which sorting algorithm runs faster?
a) Bubble sort
b) Merge sort
c) Quick sort
d) Insertion sort
Answer: d) Insertion sort
a) Merge sort
b) Quick sort
c) Selection sort
d) Insertion sort
Answer: c) Selection sort
36. Merge sort divides the array into two halves, sorts them individually, and:
a) Swaps them
a) Merge sort
b) Quick sort
c) Shell sort
d) Selection sort
Answer: b) Quick sort
a) Internal sorting
b) External sorting
c) Recursive sorting
d) Merge sort
Answer: a) Internal sorting
a) Swapping elements
a) Partitioning sort
b) Merging sort
d) Recursive sort
Answer: c) Diminishing increment sort
a) External sorting
b) Internal sorting
c) Recursion-based sorting
d) Divide-and-conquer sorting
Answer: b) Internal sorting
44. In cryptography, a cipher is:
d) Information is hidden
Answer: a) Cryptographic schemes are tested for strength
a) Compress data
b) Authenticate users
d) Encrypt emails
Answer: c) Secure HTTP connections
a) A1/1 cipher
b) A5/1 cipher
c) A5/2 cipher
d) A6/3 cipher
Answer: c) A5/2 cipher
a) Data confidentiality
b) Data redundancy
c) Data integrity
d) Authentication
Answer: b) Data redundancy
a) Masquerading
b) Modification
c) Traffic analysis
d) Denial of service
Answer: c) Traffic analysis
a) A function
b) A password
c) A key
d) A compiler
Answer: c) A key
c) Circular order
d) Priority order
Answer: b) First-in, first-out (FIFO)
a) Stacks
b) Linked lists
c) Circular queues
d) Binary trees
Answer: c) Circular queues
61. The Queue.Front() operation:
67. After a Dequeue() operation, which element becomes the front element?