CompTIA ITF+ ITF Software Development 2 — Questions and Answers
Question 1: Which programming concept allows a function to call itself during execution?
- Iteration
- Recursion (Correct answer)
- Polymorphism
- Encapsulation
Correct answer: Recursion
Recursion is when a function calls itself, often used to solve problems that can be broken into smaller sub-problems of the same type.
Question 2: What does the term 'debugging' refer to in software development?
- Writing new code features
- Removing unused libraries
- Finding and fixing errors in code (Correct answer)
- Compiling source code
Correct answer: Finding and fixing errors in code
Debugging is the process of identifying, analyzing, and removing errors (bugs) from software code.
Question 3: Which data structure operates on a Last-In, First-Out (LIFO) principle?
- Queue
- Stack (Correct answer)
- Array
- Linked list
Correct answer: Stack
A stack follows LIFO order, meaning the last element added is the first one removed, like a stack of plates.
Question 4: In software development, what is a 'library'?
- A storage location for source files
- A collection of pre-written reusable code (Correct answer)
- A type of version control system
- A debugging tool
Correct answer: A collection of pre-written reusable code
A library is a collection of pre-written functions and routines that developers can use to avoid rewriting common functionality.
Question 5: What is the purpose of pseudocode in software development?
- To execute a program faster
- To encrypt source code
- To plan program logic in plain language before coding (Correct answer)
- To test code in a sandbox environment
Correct answer: To plan program logic in plain language before coding
Pseudocode is an informal, plain-language description of an algorithm used to plan logic without worrying about syntax.
Question 6: Which of the following best describes a 'variable' in programming?
- A fixed value that never changes
- A named storage location that holds data (Correct answer)
- A type of loop structure
- A method for sorting data
Correct answer: A named storage location that holds data
A variable is a named storage location in memory that holds data which can change during program execution.
Question 7: What does 'version control' help developers manage?
- Application performance
- User interface design
- Changes to source code over time (Correct answer)
- Network bandwidth usage
Correct answer: Changes to source code over time
Version control systems track changes to code over time, allowing developers to collaborate and revert to previous versions if needed.
Which programming concept allows a function to call itself during execution?