COMPLETE EXAM PREP | PRACTICE QUESTIONS & CORRECT
ANSWERS | COMPREHENSIVE STUDY GUIDE | UPDATED VERSION
1. What is defensive programming?
Programming in a language that allows programmers to describe tasks
at a higher conceptual level than machine code.
Structuring programs and development processes in such a way that
an error in one part of the program does not trigger a disastrous
response.
Writing a program that does not contain run-time errors.
Writing a program that does not contain compile-time errors.
2. What type of attack is characterized by an attacker taking over multiple user
accounts?
Session hijacking
Denial of Service
SQL Injection
Cross-Site Scripting
3. Which of the following is a key characteristic of a good test case?
Clear and concise description of the test objective
Complex and lengthy documentation
Ambiguous test conditions
Inconsistent naming conventions
4. In a software project, if a team skips the Preparation phase of the 3 Phase
Approach, what potential consequences might arise during the Analysis
, phase?
Faster development cycles
Improved code quality
Inaccurate or incomplete analysis results
Enhanced security measures
5. What happens when an assertion evaluates to false?
None of the other choices
The program terminates with an error message.
Nothing happens.
The program enters recovery mode.
6. Describe the importance of having a clear and concise description in a test
case.
A clear description is not necessary as long as the test case is
comprehensive.
A concise description limits the information available to testers.
A clear and concise description ensures that the test case can be
easily understood and executed by different testers.
A clear description is only important for automated tests.
7. What two phases exist in penetration testing?
penetration and reporting
reconnaissance and penetration
executive statements and official statements
, reporting and cleanup
8. What is the primary purpose of a Unit Test in software development?
To validate that individual components of the software function
correctly.
To ensure that the software meets user requirements.
To test the entire application as a whole.
To identify security vulnerabilities in the code.
9. Which of the following is the KEY benefit of static analysis?
Errors are found during the application execution
Errors are found after release to production
Errors are found earlier in the development phase
Errors are found earlier in the integration phase
10. Which of the following statements best describes what unit testing is?
Unit testing describes a technique in which functions are tested by
providing randomly generated integer units as arguments to the
functions and using the results in a genetic algorithm to improve the
code.
Unit testing involves writing functions to check each function or
unit of code automatically.
Unit testing is a quality control technique in which the entire
codebase is tested as a single unit.
Unit testing involves updating units or blocks of code.
11. Name two techniques used in defensive programming.
, Static analysis and dynamic analysis
Input validation and error handling
Code obfuscation and encryption
Unit testing and code reviews
12. Describe how system monitoring and audit trail reviews contribute to overall
security in software development.
They serve to document user preferences and settings.
They help identify and respond to security incidents by providing
insights into system activities.
They primarily focus on improving the speed of the application.
They are used to enhance the graphical user interface of the
software.
13. What is the primary defense against log injection attacks?
Allow all users to write to these logs
Do not use parameterized stored procedures in the database
Use API calls to log actions
Sanitize outbound log messages
14. Name one Python debugging tool that developers can use.
Flask
PDB
Django
Jupyter Notebook