Wednesday, February 27, 2013

Ques-9: What is the difference between compile time error and Run time error?

The difference between compile time error  and Run time error is given below.

Solution:

Compile time error: Compile time error happens when the program is being compiled.Generally,compile time errors are syntax errors and they are caught by the compiler.An example of a compile time error might be leaving out a semi-colon in C.Compile time errors tend to be syntax errors.


Run time error: Run time errors  occur at run time .Generally,the program compiles but does not run correctly.An attempt to read past a null pointer in C would be an example of a run time error.Run time errors tend to be logic errors.

No comments:

Post a Comment