Which type of input validation checks data against a table of acceptable values?

Prepare for the OCR GCSE Computer Science Paper 2 exam. Practice with diverse questions, flashcards, and detailed explanations. Boost your confidence and ace your test!

The correct choice is a look-up table, which is designed to validate input by comparing the values entered against a predefined list of acceptable values. This method is particularly useful in scenarios where data must conform to specific criteria, such as user roles, product IDs, or valid codes. By referencing a table, the system can ensure that any input matches an expected value, thus reducing errors and improving data integrity.

Other types of validation serve different purposes. A syntax error focuses on checking whether the format of the input adheres to the expected syntax rules, such as ensuring that an email address contains an "@" symbol. A presence check verifies whether a required field has been filled out but does not evaluate the content of the input against accepted values. A logic error addresses issues in the program's logic or calculations, which may occur after input validation has taken place, rather than during the input phase itself.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy