Download presentation
Presentation is loading. Please wait.
1
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-1 2.8 Common Programming Errors Syntax Errors (Figure 2.15) –missing semicolon at the end of the variable declaration (line 271) –undeclared variable miles (line275 & 278) –last comment is not closed because of blank in */ close- comment sequence (line 280) Run-Time Errors (Figure 2.16) –an attempt to perform an invalid operation, detected during program execution Undetected Error and Logic Errors (discuss later)
2
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-2 Figure 2.15 Compiler Listing of a Program with Syntax Errors
3
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-3 Figure 2.16 A Program with a Run-Time Error
4
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-4 Common Programming Errors Undetected Errors –a very common source of incorrect results in C programs is the input of a mixture of character and numeric data. Logic Errors –an error caused by following an incorrect algorithm.
5
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-5 Figure 2.17 Revised Start of main Function for Coin Evaluation
6
中正大學通訊工程系 潘仁義老師 Advanced Network Technology Lab 2-6 Figure 2.18 A Program That Produces Incorrect Results Due to & Omission
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.