CS205 Foundations in Software Development
Midterm Exam Review (Qns & Ans)
2025
1. Which of the following best describes modular programming?
A. Writing the entire program in a single file
B. Dividing a program into smaller, reusable functions and
modules
C. Using only procedural programming techniques
D. Avoiding the use of global variables
ANS: B. Dividing a program into smaller, reusable functions
and modules
Rationale: Modular programming enhances code organization
and reusability by breaking it into smaller, manageable sections.
©2025
,2. Which type of software development approach prioritizes
creating prototypes before final implementation?
A. Agile
B. Waterfall
C. Rapid Application Development (RAD)
D. Spiral
ANS: C. Rapid Application Development (RAD)
Rationale: RAD focuses on prototypes and iterative
development to gather user feedback early.
3. What is the primary role of data structures in software
development?
A. Enhancing the graphical user interface
B. Organizing and storing data efficiently
C. Debugging runtime errors
D. Reducing compilation time
ANS: B. Organizing and storing data efficiently
Rationale: Data structures provide methods for organizing and
managing data systematically.
4. Which sorting algorithm divides an array into smaller
subarrays before sorting and merging them?
©2025
, A. Bubble Sort
B. Merge Sort
C. Quick Sort
D. Selection Sort
ANS: B. Merge Sort
Rationale: Merge Sort is a divide-and-conquer algorithm that
divides the array into subarrays, sorts them, and merges them
back.
5. Which principle of Object-Oriented Programming (OOP)
refers to restricting access to internal object details?
A. Abstraction
B. Polymorphism
C. Encapsulation
D. Inheritance
ANS: C. Encapsulation
Rationale: Encapsulation protects an object's internal state by
exposing only necessary methods.
---
Fill-in-the-Blank Questions
©2025
, 6. A ________ is a blueprint or template that defines the
properties and behaviors of objects in object-oriented
programming.
ANS: Class
Rationale: Classes act as templates for creating objects with
specified attributes and methods.
7. The process of determining the time and space efficiency of
an algorithm is known as ________ analysis.
ANS: Complexity
Rationale: Complexity analysis evaluates algorithm
performance based on time and memory.
8. In software development, ________ is the practice of writing
automated test cases to validate code functionality.
ANS: Test-driven development (TDD)
Rationale: TDD ensures code is verified before full
implementation.
9. ________ programming languages, such as Python, provide
built-in garbage collection for memory management.
ANS: High-level
Rationale: High-level languages simplify programming tasks
with advanced features like garbage collection.
©2025
Midterm Exam Review (Qns & Ans)
2025
1. Which of the following best describes modular programming?
A. Writing the entire program in a single file
B. Dividing a program into smaller, reusable functions and
modules
C. Using only procedural programming techniques
D. Avoiding the use of global variables
ANS: B. Dividing a program into smaller, reusable functions
and modules
Rationale: Modular programming enhances code organization
and reusability by breaking it into smaller, manageable sections.
©2025
,2. Which type of software development approach prioritizes
creating prototypes before final implementation?
A. Agile
B. Waterfall
C. Rapid Application Development (RAD)
D. Spiral
ANS: C. Rapid Application Development (RAD)
Rationale: RAD focuses on prototypes and iterative
development to gather user feedback early.
3. What is the primary role of data structures in software
development?
A. Enhancing the graphical user interface
B. Organizing and storing data efficiently
C. Debugging runtime errors
D. Reducing compilation time
ANS: B. Organizing and storing data efficiently
Rationale: Data structures provide methods for organizing and
managing data systematically.
4. Which sorting algorithm divides an array into smaller
subarrays before sorting and merging them?
©2025
, A. Bubble Sort
B. Merge Sort
C. Quick Sort
D. Selection Sort
ANS: B. Merge Sort
Rationale: Merge Sort is a divide-and-conquer algorithm that
divides the array into subarrays, sorts them, and merges them
back.
5. Which principle of Object-Oriented Programming (OOP)
refers to restricting access to internal object details?
A. Abstraction
B. Polymorphism
C. Encapsulation
D. Inheritance
ANS: C. Encapsulation
Rationale: Encapsulation protects an object's internal state by
exposing only necessary methods.
---
Fill-in-the-Blank Questions
©2025
, 6. A ________ is a blueprint or template that defines the
properties and behaviors of objects in object-oriented
programming.
ANS: Class
Rationale: Classes act as templates for creating objects with
specified attributes and methods.
7. The process of determining the time and space efficiency of
an algorithm is known as ________ analysis.
ANS: Complexity
Rationale: Complexity analysis evaluates algorithm
performance based on time and memory.
8. In software development, ________ is the practice of writing
automated test cases to validate code functionality.
ANS: Test-driven development (TDD)
Rationale: TDD ensures code is verified before full
implementation.
9. ________ programming languages, such as Python, provide
built-in garbage collection for memory management.
ANS: High-level
Rationale: High-level languages simplify programming tasks
with advanced features like garbage collection.
©2025