next up previous
Next: About this document ... Up: In the Laboratory: Editing, Previous: Lab Exercise 2: Generating

Lab Exercise 3: Generating Semantic Errors

Recall that semantic errors cannot be detected by the compiler. They are errors in the logic of the program that cause it to do something it is not really supposed to do. For each of the following errors, try to think about what will happen before you run the program. Then try to describe the logic error being committed. Ask yourself what kind of test you might perform to detect the error (if you didn't already know where it was).

That's enough! Feel free to make up your own experiments and play around some more with the program.


next up previous
Next: About this document ... Up: In the Laboratory: Editing, Previous: Lab Exercise 2: Generating
Ralph Morelli {Faculty} 2002-03-02