C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.29)


Which of the following problem causes an exception?

[A]. Missing semicolon in statement in main().
[B]. A problem in calling function.
[C]. A syntax error.
[D]. A run-time error.

Answer: Option D


No answer description available for this question.

Xyz said: (Jul 8, 2012)  
Exceptions are thrown during runtime..

Venkatesh said: (May 14, 2013)  
I want to know differences between runtime and compile time?

Premlata said: (May 29, 2013)  
Compile time based on programming syntax error checking.

Run time based on the logic of program.

Ojaswi said: (Jul 12, 2013)  
What does causing an exception mean ?

Harshal said: (Aug 5, 2013)  
Exceptions provide a way to react to exceptional circumstances (like runtime errors) in our program by transferring control to special functions called handlers.

Dhir said: (Oct 6, 2013)  
When illegal use of memory or address that means program having run time error & these program have no any syntax error, so no compilation error.

Exp. Run time error- segmentation fault or core dumped.

Payal Y. Makan said: (Oct 27, 2013)  
The remaining 3 options are compile time errors and exceptions are run time errors that occur when we run the program.

Abc said: (Nov 12, 2014)  
What an exception mean?

Shailendra said: (Nov 17, 2015)  
Exception is process to find out the error in the program.

Sri said: (Feb 5, 2016)  
Exception are check the error for run time.

Vaishnavi said: (Jun 17, 2016)  
Runtime error only occur when you run a program (it must have compiled and linked without errors). When you run the executable and something goes wrong then we call it a runtime error.

If runtime error occurs, the program would crash saying some (ex. Floating) exception or segmentation fault.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.