Showing 81–90 of 654 questions
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 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.
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.
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.
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 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).
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'.
Choose the word that is opposite in meaning to 'Verbose':
A
Eloquent
B
Talkative
C
Laconic
D
Articulate
Correct Answer:
C. Laconic
EXPLANATION
Verbose means using many words. Laconic means brief or using few words - the opposite meaning.
Which word is most similar in meaning to 'Ephemeral'?
A
Permanent
B
Transient
C
Stable
D
Enduring
Correct Answer:
B. Transient
EXPLANATION
Ephemeral means short-lived or temporary. Transient has the same meaning. Other options mean lasting or permanent.
Statement: All managers are leaders. Some employees are managers. Conclusion: All employees are leaders.
A
Definitely true
B
Definitely false
C
Cannot be determined
D
Probably true
Correct Answer:
C. Cannot be determined
EXPLANATION
Some employees are managers, but not all. So we cannot conclude that all employees are leaders.