A programmer is writing a script and accidentally types FOR i = 1 TO 10 in a language that requires keywords to be lowercase (e.g., for). The translator immediately reports an error and stops. Which type of error is this?
Senior Secondary (HKDSE) · Information and Communication Technology
Program Testing and Debugging: Practice Questions
5 multiple-choice questions marked as you go, and 1 written questions with worked solutions. All on Program Testing and Debugging.
Which of the following sets of test data is the most appropriate for performing boundary value analysis on a program that accepts a student's age, where the valid range is an integer from 6 to 18 (inclusive)?
A programmer is developing a scientific simulation that involves repeatedly adding a very small constant, \( \epsilon = 10^{-16} \), to a large variable \( Sum \), which is initialized to \( 1.0 \). Both variables are stored as standard 64-bit double-precision floating-point numbers. After \( 10^7 \) iterations, the programmer observes that the value of \( Sum \) remains exactly \( 1.0 \).
Which of the following statements correctly identifies the type of numerical error occurring and the most effective debugging method to monitor the values of the variables during the loop execution?
A software module is designed to process user ages. The valid range for input is from 1 to 120, inclusive. Which of the following sets of test data is most appropriate for boundary value analysis?
During the debugging process of a complex program, a programmer uses a stub. What is the primary function of this technique?
A computer program is designed to only accept integer inputs from 1 to 50 inclusive. Identify one boundary case value that should be included in the test data to check the limits of the input range.
Write your answer out first, then check it against the worked solution.
* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.
You've seen the model answer. Now get yours marked.
This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.
Want more questions like these? Get a fresh set on this topic, marked as you go.
Practise More