Govt Exams
Advertisement
Topics in Placement Papers
A box contains 3 red balls and 2 blue balls. What is the probability of drawing a red ball?
Correct Answer:
C. 3/5
EXPLANATION
Total balls = 5. Red balls = 3. Probability = 3/5
A rope of length 30 meters is cut into 5 equal parts. How long is each piece?
Correct Answer:
B. 6 meters
EXPLANATION
30 meters / 5 = 6 meters per piece
What will be the output of: console.log(typeof 5) in JavaScript?
Correct Answer:
B. number
EXPLANATION
The typeof operator returns 'number' for numeric values in JavaScript
Which of these is a NoSQL database?
Correct Answer:
C. MongoDB
EXPLANATION
MongoDB is a NoSQL database. MySQL, PostgreSQL, and Oracle are relational SQL databases
What does 'HTTP' stand for?
Correct Answer:
A. HyperText Transfer Protocol
EXPLANATION
HTTP stands for HyperText Transfer Protocol, the foundation of data communication on the web
What is the main purpose of a constructor in a class?
Correct Answer:
B. To initialize objects
EXPLANATION
A constructor is used to initialize objects of a class with default or specified values
Which data structure uses LIFO (Last In First Out) principle?
Correct Answer:
B. Stack
EXPLANATION
Stack follows LIFO principle where the last element added is the first to be removed
What will be the output of: print(5 // 2) in Python?
Correct Answer:
A. 2
EXPLANATION
The // operator is floor division. 5 // 2 = 2 (integer division, rounded down)
What is the correct SQL syntax to select all records from a table named 'Students'?
Correct Answer:
B. SELECT * FROM Students;
EXPLANATION
The correct SQL syntax is 'SELECT * FROM table_name;'
In OOPS, what does 'inheritance' allow you to do?
Correct Answer:
B. Derive a new class from an existing class
EXPLANATION
Inheritance allows a new class to be derived from an existing class, inheriting its properties and methods