Showing 21–30 of 50 questions
Complete the sentence: 'Despite his wealth, he lived _____ lifestyle.'
A
a modest
B
an modest
C
the modest
D
modest
Correct Answer:
A. a modest
Explanation:
'A modest' is grammatically correct. 'Modest' starts with a consonant sound, so we use 'a' not 'an'.
What is the main idea of the passage? 'Climate change is altering precipitation patterns worldwide. Regions experiencing increased rainfall face flooding, while others endure severe droughts.'
A
Global warming causes only droughts
B
Climate change affects water availability differently across regions
C
Flooding is the primary effect of climate change
D
Droughts are more dangerous than floods
Correct Answer:
B. Climate change affects water availability differently across regions
Explanation:
The passage explains that climate change affects different regions differently - some get more rain (floods) while others get less (droughts).
Identify the error: 'Each of the students are required to submit their projects by Friday.'
A
are should be is
B
their should be his/her
C
projects should be project
D
No error
Correct Answer:
A. are should be is
Explanation:
'Each' is singular, so it should be 'is' not 'are'. Correct sentence: 'Each of the students is required to submit their project by Friday.'
What does the idiom 'break the ice' mean?
A
To literally break ice
B
To initiate conversation in a social setting
C
To make something cold
D
To surprise someone
Correct Answer:
B. To initiate conversation in a social setting
Explanation:
'Break the ice' idiomatically means to initiate conversation or ease tension in a social situation.
Which of the following is NOT a programming paradigm?
A
Object-Oriented Programming
B
Functional Programming
C
Linear Programming
D
Procedural Programming
Correct Answer:
C. Linear Programming
Explanation:
Linear Programming is an optimization technique, not a programming paradigm. The others are paradigms used in software development.
Which data structure is best for implementing a queue?
A
Stack
B
Linked List
C
Array (static)
D
Hash Table
Correct Answer:
B. Linked List
Explanation:
Linked List is ideal for queue implementation as it provides O(1) insertion and deletion at both ends.
What will be the output of the following code?
int x = 5;
int y = ++x + x++;
System.out.println(y);
Explanation:
++x makes x=6 (pre-increment). Then x++ uses 6 and increments to 7. So y = 6 + 6 = 12.
Which of the following sorting algorithms is most efficient for nearly sorted data?
A
Bubble Sort
B
Quick Sort
C
Insertion Sort
D
Merge Sort
Correct Answer:
C. Insertion Sort
Explanation:
Insertion Sort has O(n) time complexity for nearly sorted data, making it the most efficient choice.
What will be printed?
String s1 = new String('Amazon');
String s2 = new String('Amazon');
System.out.println(s1 == s2);
A
true
B
false
C
null
D
Error
Explanation:
== compares memory references. Both s1 and s2 are different objects, so it prints false. Use .equals() for value comparison.
What is the primary purpose of a hash function?
A
To encrypt data
B
To map input to a fixed-size output
C
To compress data
D
To sort data
Correct Answer:
B. To map input to a fixed-size output
Explanation:
A hash function takes input data and produces a fixed-size output (hash value), useful for hash tables and data indexing.