Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
GfG 160: Daily DSA
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
C++
4.2k+ articles
C++ Programs
2.4k+ articles
C Language
2.1k+ articles
CPP Examples
700+ articles
C Programs
690+ articles
Programming Language
340+ articles
C++ Quiz
140+ articles
CPP-Basics
90+ articles
Exception Handling
32 articles
cpp-exception
15 articles
C++-Exception Handling
26 posts
Popular Articles
Recent Articles
How to Throw an Exception in C++?
Last Updated: 03 April 2024
In C++, exception handling is a mechanism that allows us to handle runtime errors and exceptions are objects that represent an error that oc
...read more
cpp-exception
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
How to Throw a Custom Exception in C++?
Last Updated: 08 February 2024
In C++, exception handling is done by throwing an exception in a try block and catching it in the catch block. We generally throw the built-
...read more
cpp-exception
Exception Handling
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
Exception Handling using Classes in C++
Last Updated: 15 May 2025
In C++, unexpected issues may occur during program execution such as attempting to divide by zero, accessing a non-existent file or using in
...read more
CPP-Basics
cpp-exception
C++
C++-Exception Handling
C++ Programs
C/C++ Puzzles
Similar Topics
C++
4.2k+ articles
C++ Programs
2.4k+ articles
C Language
2.1k+ articles
CPP Examples
700+ articles
C Programs
690+ articles
Programming Language
340+ articles
C++ Quiz
140+ articles
CPP-Basics
90+ articles
Exception Handling
32+ articles
cpp-exception
15+ articles
NULL undeclared error in C/C++ and how to resolve it
Last Updated: 02 November 2023
What is undeclared Error: When we use some constant in our program maybe they are built-in constant and may be created by a user according t
...read more
C Language
C++
C++-Exception Handling
C Programs
C++ Programs
Exception Header in C++ With Examples
Last Updated: 09 October 2022
C++ provides a list of standard exceptions defined in header exception in namespace std where "exception" is the base class for all standard
...read more
cpp-exception
Programming Language
C++
C++-Exception Handling
C++ Programs
User-defined Custom Exception with class in C++
Last Updated: 16 April 2021
We can use Exception handling with class too. Even we can throw an exception of user defined class types. For throwing an exception of say d
...read more
C++
C++-Exception Handling
C++ | Exception Handling | Question 10
Last Updated: 28 June 2021
Which of the following is true about exception handling in C++?1) There is a standard exception class like Exception class in Java.2) All ex
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 9
Last Updated: 28 June 2021
[sourcecode language="C"]#include iostreamusing namespace std;class Test { static int count; int id;public: Test() { count++; id =
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 7
Last Updated: 28 June 2021
[sourcecode language="CPP" highlight="15"]#include iostreamusing namespace std;int main(){ try { try { throw
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 5
Last Updated: 28 June 2021
[sourcecode language="C"]#include iostreamusing namespace std;int main(){ try { throw 'a'; } catch (int param) {
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 4
Last Updated: 28 June 2021
Output of following program[sourcecode language="C"]#includeiostreamusing namespace std;class Base {};class Derived: public Base {};int main
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 3
Last Updated: 28 June 2021
What should be put in a try block?1. Statements that might cause exceptions2. Statements that should be skipped in case of an exception (A)O
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 2
Last Updated: 22 September 2021
What is the advantage of exception handling ?Remove error-handling code from the software's main line of code.A method writer can choose to
...read more
Exception Handling
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 1
Last Updated: 28 June 2021
[sourcecode language="CPP"]#include iostreamusing namespace std;int main(){ int x = -1; try { cout Inside try \n; if (x 0)
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
Stack Unwinding in C++
Last Updated: 22 April 2025
Stack Unwinding is the process of removing function call frames from function call stack at run time. The local objects are destroyed in rev
...read more
C++
C++-Exception Handling
1
2
>>
Last
1
2
>>
Last
1
2
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !