Q491. When would you choose an interface over an abstract class?
Both define contracts that other types implement, but they differ in intent and mechanics. - An interface declares a contract with no state (traditionally) and supports m...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (2,728 available).
Both define contracts that other types implement, but they differ in intent and mechanics. - An interface declares a contract with no state (traditionally) and supports m...
`const` is a compile-time contract. A `const` object cannot be modified, and a `const` member function promises not to modify the object, so it can be called on const obj...
You implement the `Iterator` trait by providing `next`, which returns `Option`. ```rust struct Counter { count: u32, max: u32 } impl Iterator for Counter { type Item = u3...
`defer` schedules a function call to run when the surrounding function returns. Deferred calls run in LIFO order and are typically used for cleanup such as closing files ...
When storing distance rounded to the nearest whole mile, an **integer data type** is the optimal choice: ```sql ALTER TABLE travel_logs ADD COLUMN distance_miles INT NOT ...
**PEP 8** (Python Enhancement Proposal 8) is the official style guide for writing clean, readable, and maintainable Python code, authored in 2001 by Guido van Rossum, Bar...
Output escaping encodes user-controlled data at the moment it is written into HTML so browsers treat it as text, not markup. This is the primary defence against XSS. ```p...
The Doctype declaration specifies the type of document being used and tell the web browser how to interpret the pages content. It is located at the top of the HTML docume...
The benefits of using TypeScript include enhanced code quality through static typing, improved developer productivity with better tooling and autocompletion, increased ma...
**Objects** and **Maps** both allow you to associate keys with values, retrieve those values, delete keys, and check if a key exists. Historically, Objects have been used...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.