Computer — All MCQs
4795 questions available
Q2301.Why do responsive layouts follow a mobile-first approach?
Correct Answer: B
Mobile-first styling ensures functional design on constrained viewports before adding desktop enhancements.
Q2302.Which CSS property is used for stacking order?
Correct Answer: A
The z-index property determines the three-dimensional layering (stacking order) of positioned elements.
Q2303.Which CSS property is used for rounded corners?
Correct Answer: A
The border-radius property is used in CSS to style rounded corners.
Q2304.Which of the following is correct for a Red-Black Tree?
Correct Answer: C
A Red-Black Tree enforces that the root node must be colored black.
Q2305.Why is max polling helpful?
Correct Answer: B
Max polling reads the maximum available buffered I/O data in a single cycle, reducing execution overhead.
Q2306.Which usability heuristic focuses on system recovery from user mistakes?
Correct Answer: B
User control and freedom provides features like Undo and Redo to help users gracefully recover from errors.
Q2307.What happens if a single interface contains too many unrelated methods?
Correct Answer: B
The Interface Segregation Principle (ISP) states that clients shouldn't be forced to depend on methods they do not use.
Q2308.How does Floyd–Warshall handle negative edge weights?
Correct Answer: B
The Floyd–Warshall algorithm computes shortest paths between all pairs of vertices. It supports negative edge weights, as long as there are no negative cycles.
Q2309.What is the use of templates in C++?
Correct Answer: C
Templates enable generic programming, allowing the same code logic to be reused for multiple datatypes.
Q2310.Which language is used for server-side rendering?
Correct Answer: C
Python, using frameworks like Django or Flask, is a server-side language frequently used for SSR.
Q2311.What is the main purpose of a namespace in C++?
Correct Answer: B
Namespaces group entities and prevent identifier name collisions in large codebases.
Q2312.In SQL, which command is used to remove all rows from a table without deleting the table structure?
Correct Answer: C
The TRUNCATE command rapidly deletes all rows in a table without logging individual deletions, preserving structure.
Q2313.You want to distinguish roads, mountains, and houses in satellite imagery. Which technique is most appropriate?
Correct Answer: A
Image classification groups pixels or regional grids into semantic categories like terrain, structures, or roads.
Q2314.Reducing false negatives in a classification task usually results in?
Correct Answer: C
Tuning a classifier to minimize false negatives (misses) usually shifts the decision boundary, increasing false positives.
Q2315.What is the main purpose of software documentation?
Correct Answer: B
Documentation provides comprehensive instructions, requirements, and guides for users and developers.
Q2316.Which SDLC model is best for projects with clearly defined requirements and little expected change?
Correct Answer: B
The classical Waterfall model is a rigid, sequential life cycle ideal for well-understood projects with fixed requirements.
Q2317.Which algorithm is used for symmetric encryption?
Correct Answer: B
AES (Advanced Encryption Standard) is a symmetric encryption algorithm. Symmetric encryption uses the same key for encryption and decryption. RSA and Diffie-Hellman are asymmetric algorithms using public/private keys. SHA-256 is a hash function, not an encryption algorithm.
Q2318.Which principle ensures that data is not altered by unauthorized users?
Correct Answer: B
Integrity ensures that data is accurate and unaltered. It protects against unauthorized modifications or tampering.
Q2319.console.log([] + [])
Correct Answer: B
In JavaScript, the + operator performs string concatenation if any operand is a string. [] (an empty array) is converted to an empty string when used with +. So [] + [] becomes "" + "" -> "" (empty string). This is due to type coercion in JavaScript. The result is not undefined, [], or 0—it's an empty string.
Q2320.console.log([..."hello"])
Correct Answer: C
The spread operator ... in JavaScript expands iterable objects like strings or arrays. "hello" is a string, which is iterable. [..."hello"] spreads each character into a new array. Resulting array: ['h', 'e', 'l', 'l', 'o']. It is not a single string or 'lo', and definitely not undefined.