Program Debugging
Print this page

Run time Errors:

  • Correcting run time errors are easier than correcting logical errors.

  • We discusses most important run time errors.
  • Segmentation fault : It occurs when a program try to access a memory location that it is not allowed to access.
    • This location may part of the operating system, other user, or other processes.
  • Divide by zero: Many operating systems report message Floating point exception , when there is expression which denominator of the division is 0.
  • Stack Over flow: Most of the cases it happen, when there is infinite recursion. In recursive function calls, program has to store various environment variables, before start executing the calling function. It can also happen when there are many big temporary arrays.
  • Whenever these errors occurs, program execution stops with appropriate error message.
  • These errors also can be debugged using gdb .
 
Problems  
  1. Take any of your program and run it using a interactive debugger and examine intermediate values.

 
Prev
First | End