B.S.W.E. Bachelor of Software Engineering B.S.W.E. Bachelor of Software Engineering MCQ 5 — Questions and Answers
Question 1: Which memory management technique automatically reclaims memory that is no longer referenced by any active part of a program?
- Manual memory management
- Stack allocation
- Garbage collection (Correct answer)
- Memory pooling
Correct answer: Garbage collection
Garbage collection automatically identifies and frees memory occupied by objects that are no longer reachable, preventing memory leaks.
Question 2: In software requirement engineering, a use case diagram primarily illustrates:
- The internal class structure of the system
- The sequence of method calls in a process
- Interactions between actors and the system's functional requirements (Correct answer)
- The deployment topology of servers and components
Correct answer: Interactions between actors and the system's functional requirements
Use case diagrams show the functional requirements of a system by depicting which actors interact with which use cases, giving a high-level behavioral view.
Question 3: Which sorting algorithm has the best worst-case time complexity of O(n log n)?
- Quick Sort
- Bubble Sort
- Merge Sort (Correct answer)
- Insertion Sort
Correct answer: Merge Sort
Merge Sort guarantees O(n log n) performance in all cases—best, average, and worst—by dividing the array in half recursively and merging sorted halves.
Question 4: Which cloud computing service model provides virtualized computing infrastructure (servers, storage, networking) over the internet?
- Software as a Service (SaaS)
- Platform as a Service (PaaS)
- Infrastructure as a Service (IaaS) (Correct answer)
- Function as a Service (FaaS)
Correct answer: Infrastructure as a Service (IaaS)
IaaS delivers raw virtualized hardware resources—compute, storage, and networking—that users manage and configure themselves.
Question 5: In software project management, the critical path of a project network is defined as:
- The shortest path from start to finish in the task network
- The path with the most expensive tasks
- The longest path from start to finish that determines the minimum project duration (Correct answer)
- The path with the highest risk tasks
Correct answer: The longest path from start to finish that determines the minimum project duration
The critical path is the longest sequence of dependent tasks, and any delay on this path directly delays the entire project completion.
Question 6: Which object-oriented concept allows a subclass to provide a specific implementation of a method already defined in its superclass?
- Overloading
- Encapsulation
- Overriding (Correct answer)
- Abstraction
Correct answer: Overriding
Method overriding allows a subclass to redefine a method inherited from its parent class to provide behavior specific to the subclass.
Question 7: Which software metric measures the number of linearly independent paths through a program's source code?
- Lines of Code (LOC)
- Function Point
- Cyclomatic Complexity (Correct answer)
- Halstead Complexity
Correct answer: Cyclomatic Complexity
Cyclomatic complexity, introduced by McCabe, counts independent paths through a module and is commonly used to gauge testability and potential for bugs.
Which memory management technique automatically reclaims memory that is no longer referenced by any active part of a program?