Prep with Verified Answers
What is a "nested loop" and how is it used?
✔✔A nested loop is a loop within another loop, used to iterate over multidimensional data
structures or perform complex repetitive tasks.
What does "code modularity" involve and why is it beneficial?
✔✔Code modularity involves breaking code into smaller, reusable modules or functions,
improving readability, maintainability, and testability.
How does "recursion" work and when is it typically used?
✔✔Recursion occurs when a function calls itself to solve smaller instances of a problem, often
used for tasks like tree traversal or solving mathematical problems.
What is a "Boolean expression" and how is it used in programming?
✔✔A Boolean expression evaluates to either true or false and is used to control the flow of a
program with conditional statements.
1
,What is the role of "exception handling" in a program?
✔✔Exception handling manages runtime errors by allowing a program to continue operating or
handle errors gracefully without crashing.
What does "algorithm complexity" mean and how is it measured?
✔✔Algorithm complexity measures the efficiency of an algorithm in terms of time and space,
often expressed using Big O notation.
What is the purpose of "unit testing" in software development?
✔✔Unit testing involves testing individual components or functions of a program to ensure they
work correctly before integrating them into a larger system.
How does "data encapsulation" improve code security?
✔✔Data encapsulation hides internal data and implementation details from outside access,
protecting the data and preventing unauthorized modifications.
What is a "class" in object-oriented programming and how is it used?
2
,✔✔A class is a blueprint for creating objects that defines attributes and methods, allowing for
the organization and management of related data and behaviors.
What does "pseudo-code" accomplish in algorithm design?
✔✔Pseudo-code provides a high-level description of an algorithm using plain language-like
syntax, making it easier to understand and translate into actual code.
What is the function of an "if statement" in programming?
✔✔An if statement evaluates a condition and executes a block of code if the condition is true.
How does a "for loop" operate in programming?
✔✔A for loop iterates over a sequence or range of values, executing a block of code for each
value.
What is "software abstraction" and why is it used?
✔✔Software abstraction hides complex implementation details and exposes only necessary parts
to simplify interactions and reduce complexity.
What is the difference between "sequential" and "parallel" processing?
3
, ✔✔Sequential processing executes tasks one after the other, while parallel processing executes
multiple tasks simultaneously to improve efficiency.
What does "modular programming" involve?
✔✔Modular programming involves dividing a program into smaller, independent modules or
functions, making it easier to develop, test, and maintain.
What is "debugging" and how does it benefit software development?
✔✔Debugging is the process of finding and fixing errors in code, which improves the
functionality and reliability of software.
What is an "event handler" and how does it work?
✔✔An event handler is a function or method that responds to specific events or actions, such as
user interactions or system events.
What is the purpose of a "data structure"?
✔✔A data structure organizes and stores data efficiently to facilitate easy access, manipulation,
and management.
4