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
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
C Programs
800+ articles
CPP Examples
700+ articles
Programming Language
420+ 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: 11 April 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++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
C Programs
800+ articles
CPP Examples
700+ articles
Programming Language
420+ 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++-Exception Handling
C++ Programs
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 !