Which type of input validation should be used to check a National Insurance number?
- Range check
- Length check
- Format check
- Presence check
What is meant by code maintainability?
- The speed at which code is executed
- The ease with which code can be understood, modified, and extended
- The size of the source code files
- The security measures implemented in the code
Which type of input validation is commonly used to verify the length of a password or username?
- Range check
- Format check
- Length check
- Presence check
Which of the following is the primary purpose of input validation in computer programming?
- Enhancing program performance
- Ensuring data integrity
- Reducing code complexity
- Improving user interface
Which type of error is caused by misspelling a variable name?
- Logic error
- Syntax error
- Type error
- Iterative error
Which programming practice contributes to improved code maintainability?
- Writing overly complex and lengthy functions
- Avoiding the use of comments in the code
- Following a consistent coding style and naming conventions
- Ignoring code documentation
A system processes postcodes. What type of validation should be used?
- Range check
- Length check
- Format check
- Presence check
What is sanitisation?
- The process of hiding or protecting data so it cannot be seen or disclosed.
- The process of encrypting or obfuscating data so it cannot be read or understood.
- The process of compressing or summarising data so it cannot be stored or transmitted.
- The process of deleting or overwriting data so it cannot be recovered or restored.
When should comments not be added to code?
- To state the purpose of the program
- To identify the end of a
for loop - To describe the purpose of a function
- When code is obvious and self-explanatory
What is another name for final testing?
- Terminal testing
- Active testing
- Boolean testing
- Iterative testing