What is a 'Constructor' in programming?
A A method that destroys objects B A special method that initializes objects C A variable declaration D A loop structure
A constructor is a special method called when an object is created to initialize its properties.
What is the difference between '==' and '===' in JavaScript?
A No difference B '==' checks value, '===' checks value and type C '==' checks type, '===' checks value D '===' is only for strings
'==' is loose equality (compares value only), while '===' is strict equality (compares both value and type).
What is an 'Interface' in OOP?
A A graphical display B A contract that specifies methods a class must implement C A type of variable D A database connection
An interface is an abstract type that defines a set of methods that implementing classes must provide.
What is Machine Learning?
A Programming machines to perform tasks B Teaching machines to learn from data and make predictions C Manufacturing computers D Operating heavy machinery
Machine Learning is a subset of AI that enables systems to learn from data and improve performance without explicit programming.
What is the purpose of Unit Testing?
A To test entire applications B To test individual components or functions C To design user interfaces D To manage databases
Unit testing involves testing individual units or components of code in isolation to ensure they work correctly.
Advertisement
What is the missing number in the series: 2, 6, 12, 20, ?, 42
A 28 B 30 C 32 D 35
Series follows n(n+1): 1×2=2, 2×3=6, 3×4=12, 4×5=20, 5×6=30, 6×7=42
If a:b = 3:4 and b:c = 5:6, then a:b:c is:
A 15:20:24 B 3:4:5 C 15:12:24 D 10:15:18
a:b = 3:4, b:c = 5:6. Multiply first by 5 and second by 4: a:b = 15:20, b:c = 20:24. So a:b:c = 15:20:24
In a class of 50 students, 30 study Math and 25 study Science. How many study both?
A 5 B 10 C 15 D 20
Using set theory: n(M∪S) = n(M) + n(S) - n(M∩S). 50 = 30 + 25 - n(M∩S). n(M∩S) = 5
If x² + 1/x² = 7, then x + 1/x is:
A 3 B ±3 C ±2 D 2
(x + 1/x)² = x² + 2 + 1/x² = 7 + 2 = 9. So x + 1/x = ±3
A man walks 5 km north, then 3 km east, then 5 km south. How far is he from his starting point?
A 3 km B 5 km C 8 km D 13 km
After north and south movements (cancel out), he is only 3 km east of starting point
What is the angle between the hour hand and minute hand at 3:15?
A 6.5° B 7.5° C 8.5° D 9.5°
At 3:15, minute hand at 3 (90°), hour hand at 3 + 60 15 × 30 = 97.5°. Difference = 7.5°
Statement: Some doctors are teachers. All teachers are educated. Conclusion: Some doctors are educated.
A Follows B Does not follow C Partially follows D Cannot be determined
Since some doctors are teachers, and all teachers are educated, some doctors must be educated
If ROSE is coded as 6918, then NOSE is coded as:
A 1918 B 1968 C 1916 D 1915
R=6, O=9, S=1, E=8. So NOSE = 1-9-1-8 = 1918
If ORANGE is to FRUIT, then SHARK is to:
A AQUATIC B ANIMAL C FISH D OCEAN
Orange is a type of fruit. Shark is a type of fish. This is a classification relationship
Look at this sequence: AZ, BY, CX, DW, ?
A EV B EW C FV D EU
First letter advances (A→B→C→D→E), second letter reverses (Z→Y→X→W→V)
Rearrange: PLUOITCMAC. What word is formed?
A COMPLAINT B COMPLIANT C COMMUNION D COMPUTE
PLUOITCMAC rearranged = COMPLIANT (meaning willing/agreeable)
What is the main difference between an array and a linked list?
A Arrays are slower B Arrays use continuous memory; linked lists use scattered memory C Linked lists can only store numbers D Arrays are always smaller
Arrays allocate continuous memory blocks; linked lists use nodes scattered in memory
Which of the following is NOT a cloud service model?
A SaaS B PaaS C IaaS D DaaS
SaaS (Software as Service), PaaS (Platform as Service), IaaS (Infrastructure as Service) are main cloud models. DaaS is Data as Service but not standard
Which sorting algorithm has the best average time complexity?
A Bubble sort B Quick sort C Linear sort D Selection sort
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
Encapsulation is bundling data (variables) and methods together while hiding implementation details