IT211
Fundamentals of Programming
Comprehensive Finals Review (Qns & Ans)
2025
1. Multiple Choice:
Which of the following is a primary benefit of using recursion in
programming?
A) It simplifies complex problems by breaking them into smaller,
more manageable parts.
B) It increases the speed of execution for iterative processes.
C) It decreases memory usage by avoiding stack frames.
D) It limits error handling capabilities.
©2024/2025
,Correct ANS: A)
Rationale: Recursion allows complex problems to be broken
down into simpler ones, offering a more elegant solution in many
scenarios.
2. Fill-in-the-Blank:
The principle of _____________ suggests that a function should
have limited responsibilities and focus on completing a particular
task within the program.
Correct ANS: Single Responsibility Principle
Rationale: This principle ensures that a function or class has one
reason to change, aligning with modular design practices.
3. True/False:
Inheritance in object-oriented programming increases code
reusability and flexibility.
Correct ANS: True
Rationale: Inheritance allows new objects to take on properties of
existing ones, reducing redundancy and enhancing code
reusability.
©2024/2025
, 4. Multiple Response:
Select all benefits of using a strongly typed programming
language.
A) Improved type safety
B) Enhanced runtime flexibility
C) Better memory management
D) Easier debugging
Correct ANSs: A, D
Rationale: Strong typing enforces type safety at compile time,
reducing errors and aiding in easier debugging but not necessarily
enhancing runtime flexibility or memory management directly.
5. Multiple Choice:
Which sorting algorithm is considered the most efficient on
average, in terms of time complexity, for large datasets?
A) Bubble Sort
B) Selection Sort
C) Quick Sort
D) Insertion Sort
Correct ANS: C)
©2024/2025
, Rationale: Quick Sort generally provides a better average
performance with a time complexity of O(n log n), especially for
large datasets.
6. Fill-in-the-Blank:
In data structures, a __________ is a collection where each
element points to the next, forming a sequential pathway.
Correct ANS: Linked List
Rationale: A linked list is a linear collection of data elements
pointing to the next, facilitating dynamic memory allocation.
7. True/False:
Polymorphism in software engineering allows the same function
name or operator to behave differently in different contexts.
Correct ANS: True
Rationale: Polymorphism facilitates code flexibility by allowing
methods to process objects differently based on their data type or
class.
8. Multiple Response:
Identify all characteristics of functional programming.
©2024/2025
Fundamentals of Programming
Comprehensive Finals Review (Qns & Ans)
2025
1. Multiple Choice:
Which of the following is a primary benefit of using recursion in
programming?
A) It simplifies complex problems by breaking them into smaller,
more manageable parts.
B) It increases the speed of execution for iterative processes.
C) It decreases memory usage by avoiding stack frames.
D) It limits error handling capabilities.
©2024/2025
,Correct ANS: A)
Rationale: Recursion allows complex problems to be broken
down into simpler ones, offering a more elegant solution in many
scenarios.
2. Fill-in-the-Blank:
The principle of _____________ suggests that a function should
have limited responsibilities and focus on completing a particular
task within the program.
Correct ANS: Single Responsibility Principle
Rationale: This principle ensures that a function or class has one
reason to change, aligning with modular design practices.
3. True/False:
Inheritance in object-oriented programming increases code
reusability and flexibility.
Correct ANS: True
Rationale: Inheritance allows new objects to take on properties of
existing ones, reducing redundancy and enhancing code
reusability.
©2024/2025
, 4. Multiple Response:
Select all benefits of using a strongly typed programming
language.
A) Improved type safety
B) Enhanced runtime flexibility
C) Better memory management
D) Easier debugging
Correct ANSs: A, D
Rationale: Strong typing enforces type safety at compile time,
reducing errors and aiding in easier debugging but not necessarily
enhancing runtime flexibility or memory management directly.
5. Multiple Choice:
Which sorting algorithm is considered the most efficient on
average, in terms of time complexity, for large datasets?
A) Bubble Sort
B) Selection Sort
C) Quick Sort
D) Insertion Sort
Correct ANS: C)
©2024/2025
, Rationale: Quick Sort generally provides a better average
performance with a time complexity of O(n log n), especially for
large datasets.
6. Fill-in-the-Blank:
In data structures, a __________ is a collection where each
element points to the next, forming a sequential pathway.
Correct ANS: Linked List
Rationale: A linked list is a linear collection of data elements
pointing to the next, facilitating dynamic memory allocation.
7. True/False:
Polymorphism in software engineering allows the same function
name or operator to behave differently in different contexts.
Correct ANS: True
Rationale: Polymorphism facilitates code flexibility by allowing
methods to process objects differently based on their data type or
class.
8. Multiple Response:
Identify all characteristics of functional programming.
©2024/2025