CS Electrical And Electronics
@cselectricalandelectronics

What is an exception?

All QuestionsCategory: Cpp LanguageWhat is an exception?
Chetan Shidling asked 4 years ago

I need short information.

1 Answers
chetan shidling answered 4 years ago

An exception is an occurrence of an undesirable situation that can be detected during the execution of the program. When an exception occurs the program will be terminated abnormally.
Example of exception:
01. Divide by zero is an exception
02. Trying to open a file that does not exist is an exception.
03. Accessing the array elements with negative index values is an exception.