Showing 21–30 of 50 questions
If all roses are flowers and some flowers are red, then which statement is true?
A
All roses are red
B
Some roses are red
C
No roses are red
D
Cannot be determined
Correct Answer:
D. Cannot be determined
Explanation:
Roses are a subset of flowers, but we don't know which flowers are red. Some red flowers might not be roses.
Find the odd one out: 12, 24, 36, 48, 58
Explanation:
12, 24, 36, 48 are all multiples of 12. 58 is not a multiple of 12
If ROSE is coded as 4567, then PETAL is coded as?
A
98214
B
89214
C
98124
D
89124
Explanation:
R=4, O=5, S=6, E=7. Following alphabet position: P=1(9), E=7(8), T=2(9→2 with shift), A=1, L=4. PETAL = 89214
Select the word that is most similar in meaning to 'Benign':
A
Harmful
B
Friendly
C
Strict
D
Complex
Correct Answer:
B. Friendly
Explanation:
Benign means harmless, kind, or gentle. Friendly is the closest synonym
Antonym of 'Verbose' is:
A
Detailed
B
Precise
C
Concise
D
Extensive
Correct Answer:
C. Concise
Explanation:
Verbose means using more words than necessary. Concise is its opposite—using few words
What will be the output of this pseudocode? x = 5; y = 10; z = x + y * 2; print(z)
Explanation:
Following order of operations: y * 2 = 10 * 2 = 20. Then x + 20 = 5 + 20 = 25. Wait, output is 25, not 30. Let me recalculate: x + y * 2 = 5 + 10*2 = 5 + 20 = 25
Which data structure uses LIFO (Last In First Out)?
A
Queue
B
Stack
C
Array
D
Tree
Explanation:
Stack follows LIFO principle. Queue follows FIFO. Array and Tree are not strictly LIFO/FIFO structures
In OOP, what is inheritance?
A
Creating multiple instances of a class
B
A class acquiring properties of another class
C
Hiding internal implementation details
D
Creating interfaces
Correct Answer:
B. A class acquiring properties of another class
Explanation:
Inheritance allows a class to inherit properties and methods from another class (parent/base class)
Which sorting algorithm has the best average case time complexity?
A
Bubble Sort
B
Quick Sort
C
Insertion Sort
D
Selection Sort
Correct Answer:
B. Quick Sort
Explanation:
Quick Sort has O(n log n) average case complexity, which is optimal among comparison-based sorts
What is the output of: System.out.println(10 / 3) in Java?
Explanation:
Both operands are integers, so integer division is performed: 10 / 3 = 3 (truncated)