Showing 391–400 of 654 questions
Which keyword is used to define a class in Python?
A
class
B
Class
C
define
D
struct
Explanation:
Python uses lowercase 'class' keyword to define classes
What does HTTP stand for?
A
HyperText Transfer Protocol
B
High Transfer Text Protocol
C
Home Telecom Transfer Protocol
D
Hybrid Text Transfer Package
Correct Answer:
A. HyperText Transfer Protocol
Explanation:
HTTP is HyperText Transfer Protocol, the foundation of data communication on the web
Which of the following is NOT a cloud service model?
A
SaaS
B
PaaS
C
IaaS
D
DaaS
Explanation:
SaaS (Software as Service), PaaS (Platform as Service), IaaS (Infrastructure as Service) are main cloud models. DaaS is Data as Service but not standard
What does CSS stand for?
A
Computer Style Sheets
B
Cascading Style Sheets
C
Compiled Style Scripts
D
Central Styling System
Correct Answer:
B. Cascading Style Sheets
Explanation:
CSS (Cascading Style Sheets) is used for styling HTML elements
Which sorting algorithm has the best average time complexity?
A
Bubble sort
B
Quick sort
C
Linear sort
D
Selection sort
Correct Answer:
B. Quick sort
Explanation:
Quick sort has average time complexity O(n log n), better than bubble sort O(n²)
What is encapsulation in OOP?
A
Writing code in packages
B
Bundling data and methods together while hiding internal details
C
Creating new objects
D
Sorting data
Correct Answer:
B. Bundling data and methods together while hiding internal details
Explanation:
Encapsulation is bundling data (variables) and methods together while hiding implementation details
What is the default access modifier in Java?
A
public
B
private
C
protected
D
package-private
Correct Answer:
D. package-private
Explanation:
If no modifier is specified in Java, it defaults to package-private (accessible within the same package)
Which of the following best describes a compiler?
A
Executes code line by line
B
Translates entire source code to machine code before execution
C
Debugs code
D
Stores code
Correct Answer:
B. Translates entire source code to machine code before execution
Explanation:
A compiler translates the entire program before execution (unlike interpreters which translate line by line)
What does MVC stand for in web development?
A
Model View Controller
B
Main Virtual Code
C
Multiple Variable Control
D
Memory View Cache
Correct Answer:
A. Model View Controller
Explanation:
MVC (Model View Controller) is an architectural pattern separating data, presentation, and logic
A train travels from City A to City B at 60 km/h and returns at 40 km/h. What is the average speed for the entire journey?
A
48 km/h
B
50 km/h
C
52 km/h
D
55 km/h
Correct Answer:
A. 48 km/h
Explanation:
Average speed = (2 × v1 × v2)/(v1 + v2) = (2 × 60 × 40)/(60 + 40) = 4800/100 = 48 km/h. This is the harmonic mean formula for equal distances.