Question

How do you discover compile-time errors? How do you discover run-time errors?

Solution

Verified
Step 1
1 of 2

Compile-time\textbf{Compile-time} errors are usually easier\textit{easier} to find, because the compiler\textbf{compiler} will draw your attention\text{\underline{draw your attention}} to the location\textit{location} of the error. Although what the compiler says will not always\textit{not always} make the compile-time error easy to fix, at least you will get a general idea\textbf{general idea} of where to start looking.



Run-time\textbf{Run-time} errors, on the other hand, are more difficult\textbf{more difficult} to locate and fix, because syntactically\textbf{syntactically} the program is correct\textbf{correct} (compiles and runs), but some other, usually\textit{usually} logical\textbf{logical} problem prevents it from being correct. In this chapter, the book gives an example of grammatical errors, but in programming some of the most occurring run time errors are loops that do not terminate, inputting some kind of data to a function which is not built to handle it properly, and so on. In this case, usually the compiler does not say anything.

Create an account to view solutions

Create an account to view solutions

Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface 5th Edition by David A. Patterson, John L. Hennessy

Computer Organization and Design MIPS Edition: The Hardware/Software Interface

5th EditionISBN: 9780124077263 (3 more)David A. Patterson, John L. Hennessy
220 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionISBN: 9780133970777 (2 more)Ramez Elmasri, Shamkant B. Navathe
687 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionISBN: 9780262033848 (2 more)Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
726 solutions
Python for Everyone 2nd Edition by Cay S. Horstmann, Rance D. Necaise

Python for Everyone

2nd EditionISBN: 9781119056553 (2 more)Cay S. Horstmann, Rance D. Necaise
730 solutions

More related questions

1/4

1/7