高中 (HKDSE) · 資訊及通訊科技

程式測試和除錯:练习题

5 道选择题即时批改,另有 1 道文字题附完整解题步骤,全部围绕「程式測試和除錯」。

6 道题目7 免费,无需注册
第 1 题
1

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?

第 2 题
1

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)?

第 3 题
1

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?

第 4 题
1

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?

第 5 题
1

During the debugging process of a complex program, a programmer uses a stub. What is the primary function of this technique?

第 6 题
2

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.

先自己写一遍答案,再对照解题步骤。

* thinka 提供的内容由 AI 生成,未必在任何情况下都完全准确或最新,请结合官方教材与教师指导使用。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习