Tuesday, 24 June 2014

What are Run time and Syntax Error in C++ with Examples.


What are run time and syntax error in C++ with examples.




In C++ the runtime error is an error that occurs basically at the time of execution of a program . The compilation of the program is not affected with it .

Example for this is :

"File could not be opened ","Not enough memory available " , are run time errors.





A syntax error is that when statements are wrongly written violating rules and regulations of the C++ programming language .

For example :

MAX+2=DMAX is an syntax error as an expression can not appear on the left side of an assignment operator.

No comments:

Post a Comment