Read each question, consider the options, then reveal the correct answer and explanation.
100 MCQs10 per page8 of 10
MCQ 71Oop & Uml
What is the primary difference between 'static polymorphism' and 'dynamic polymorphism' in object-oriented languages like C++?
Static polymorphism is resolved at compile time (e.g., function overloading); dynamic polymorphism is resolved at runtime (e.g., virtual functions)
They are identical concepts
Dynamic polymorphism is always resolved at compile time
Static polymorphism requires virtual functions
Correct answerA — Static polymorphism is resolved at compile time (e.g., function overloading); dynamic polymorphism is resolved at runtime (e.g., virtual functions)
Explanation
Static (compile-time) polymorphism, such as function or operator overloading, is resolved by the compiler before the program runs, while dynamic (runtime) polymorphism, achieved through virtual functions, is resolved during program execution based on the actual object type.
MCQ 72Computer Hardware & Architecture
What is the primary advantage of an ASIC over an FPGA for a fixed, high-volume application?
ASICs can be reprogrammed after deployment, unlike FPGAs
ASICs are always cheaper to design initially
There is no meaningful performance difference
ASICs typically offer better performance and lower per-unit cost at high volumes, since they are custom-designed for one specific task
Correct answerD — ASICs typically offer better performance and lower per-unit cost at high volumes, since they are custom-designed for one specific task
Explanation
Because an ASIC is custom-designed and manufactured for one specific task, it typically achieves better performance and lower per-unit cost at high production volumes compared to a more flexible, general-purpose FPGA, though FPGAs offer post-manufacturing reconfigurability.
MCQ 73C C++ Programming
Which of the following best describes the purpose of 'immutable infrastructure' as a deployment philosophy?
Manually patching servers in place whenever a change is needed
Treating deployed servers or containers as unchangeable once created; any update is done by deploying entirely new instances rather than modifying existing ones
A synonym for a monolithic architecture
A technique used only for database schema changes
Correct answerB — Treating deployed servers or containers as unchangeable once created; any update is done by deploying entirely new instances rather than modifying existing ones
Explanation
Immutable infrastructure treats deployed servers or containers as fixed, unchangeable artifacts; rather than patching a running instance in place, any change is made by building and deploying an entirely new instance, improving consistency and reducing configuration drift.
MCQ 74Web Technologies
What is the purpose of 'CSS containment' (the 'contain' property) in modern web performance optimization?
To permanently hide an element
To tell the browser that an element's subtree is independent of the rest of the page, allowing the browser to optimize rendering and layout calculations
A synonym for CSS Grid
A technique used only for print stylesheets
Correct answerB — To tell the browser that an element's subtree is independent of the rest of the page, allowing the browser to optimize rendering and layout calculations
Explanation
The CSS 'contain' property signals to the browser that changes within a particular element's subtree won't affect elements outside it, allowing the browser to skip unnecessary layout, paint, or style recalculations for the rest of the page, improving rendering performance.
MCQ 75Database Pl/sql
Which of the following best describes the purpose of PL/SQL 'autonomous transactions'?
A transaction that can be committed or rolled back independently of the main, calling transaction, useful for logging actions that should persist even if the main transaction fails
Transactions that automatically roll back after every statement
A synonym for a distributed transaction
A feature used only for read-only queries
Correct answerA — A transaction that can be committed or rolled back independently of the main, calling transaction, useful for logging actions that should persist even if the main transaction fails
Explanation
An autonomous transaction operates independently of its calling transaction, allowing it to commit or roll back on its own, which is commonly used for logging or auditing actions that need to persist regardless of whether the outer transaction ultimately succeeds or fails.
MCQ 76Computer Hardware & Architecture
What is the purpose of 'processor instruction fusion' (macro-op fusion) in modern CPU pipeline design?
To physically merge two separate CPU cores into one
To combine certain common pairs of adjacent instructions into a single internal micro-operation during decode, improving pipeline throughput and reducing the number of operations that need to be tracked
A synonym for SIMD vectorization
A technique used only for memory allocation
Correct answerB — To combine certain common pairs of adjacent instructions into a single internal micro-operation during decode, improving pipeline throughput and reducing the number of operations that need to be tracked
Explanation
Instruction (macro-op) fusion combines certain common pairs of adjacent instructions into a single internal micro-operation during the decode stage, improving pipeline throughput by reducing the total number of operations that need to be individually tracked and executed.
MCQ 77Computer Networks
Which of the following best describes the purpose of 'network packet fragmentation'?
To permanently corrupt packets during transmission
A synonym for packet encryption
A technique used only for wireless networks
To break a packet larger than the outgoing link's MTU into smaller pieces that can be transmitted and later reassembled at the destination
Correct answerD — To break a packet larger than the outgoing link's MTU into smaller pieces that can be transmitted and later reassembled at the destination
Explanation
Packet fragmentation splits a packet that exceeds a network link's Maximum Transmission Unit into smaller fragments that can be transmitted across that link and reassembled by the receiving host, though it can introduce overhead and potential issues if fragments are lost.
MCQ 78Computer Networks
Which of the following best describes 'network address translation traversal' (NAT traversal) techniques, such as STUN?
A method for permanently disabling NAT
A synonym for VPN tunneling
Techniques that allow devices behind a NAT to establish direct peer-to-peer connections, despite the address translation obscuring their real internal addresses
A method for compressing NAT tables
Correct answerC — Techniques that allow devices behind a NAT to establish direct peer-to-peer connections, despite the address translation obscuring their real internal addresses
Explanation
NAT traversal techniques, such as STUN (Session Traversal Utilities for NAT), help devices behind a NAT discover their public-facing address and establish direct peer-to-peer connections despite the translation layer, commonly used in VoIP and video calling applications.
MCQ 79C C++ Programming
Which of the following best describes the purpose of 'design by contract' as a software correctness methodology?
A legal agreement signed by developers
Formally specifying preconditions, postconditions, and invariants that a piece of code must satisfy, treating the interaction between components as a contractual obligation
A synonym for unit testing
A technique used only for database design
Correct answerB — Formally specifying preconditions, postconditions, and invariants that a piece of code must satisfy, treating the interaction between components as a contractual obligation
Explanation
Design by contract formally specifies preconditions (what must be true before a method runs), postconditions (what must be true after), and invariants, treating interactions between software components as explicit contractual obligations that can be checked and enforced.
MCQ 80Computer Networks
Which of the following best describes the purpose of 'network address translation hairpinning' (NAT loopback)?
To permanently block internal-to-internal traffic
A synonym for port forwarding with no distinction
To allow a device on a local network to access another local device using the external, public-facing IP address and port mapping, correctly routing the traffic back through the NAT device rather than out to the internet and back
A technique used only for IPv6 networks
Correct answerC — To allow a device on a local network to access another local device using the external, public-facing IP address and port mapping, correctly routing the traffic back through the NAT device rather than out to the internet and back
Explanation
NAT hairpinning (loopback) allows an internal device to reach another internal device using the external public IP and forwarded port, with the NAT device correctly routing the traffic back internally rather than requiring it to actually traverse the internet and return.