Exceptions are runtime anomalies or abnormal condition that a program encounters during its execution. There are two types of exceptions:
Synchronous
Asynchronous
Exceptions which are beyond...
In C++, there is a way to describe the behavior of a class without committing to a particular implementation of that class. This feature is offered by C++ objects and classes. Using abstract classe...
Encapsulation is one of the key features of object oriented programming. It involves the building of data members and functions inside a class.
Building similar data members and functions inside a...
Data abstraction is a process of providing only the essential details to the outside world and hiding the internal details. i.e. representing only the essential details in a program.
Data abstrac...
The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form.
A real-life example of polymorphism is...
With function overloading, multiple functions can have the same name with different parameters.
For example
int myFunction(int x)
float myFunxtion(float x)
double myFunction(double x, double ...
The capability of a class to derive properties and characteristics from another class is called inheritance. Inheritance is one of the most important features of object-oriented programming.
Inhe...
C++ is an object oriented programming language.
Everything in C++ is associated with classes and objects along with its attributes and methods. For example: in real life, a car is an object. The c...
Data structures are formats used to organize, store and manage data. You can use data structures to access and modify data efficiently. There are various types of data structures. The type you us...
Imagine twitter without input and output. That is impossible, isn't it? Input and output are critical to any program. C++ is no different.
In order to display output or gather inputs, there are a...
The C++ standard library does not provide a proper date type. C++ inherits the structs and functions for date and time manipulation from C. To access date and time related functions and structures,...
So far, we know that C++ supports two types of variables:
An ordinary variable is a variable that contains the value of some type. For example, we create a variable of type int. Which means that...
Pointers are symbolic representation of an address. They enable programs to simulate call-by-reference as well as to create and manipulate dynamic data structures. Iterating over elements in arrays...
In C++, string is an object of std::string class that represent sequence of characters. We can perform many operations on strings such as concatenation, comparison, conversion, etc.
C++ String ...
An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
That means that, for example ...
In this tutorial, we are going to explore numeric data types in C++ programming language.
C++ is a core programming language that makes great use of numeric data types. These numeric data types ca...
A function is a block of code which only runs when it is called. You can pass data, known as parameters into a function.
Functions in C++ are used to perform certain task, and they are important f...
Decision-making in C++ is deciding the order of execution of statements based on certain conditions or repeating a group of statements until certain specified conditions are met. C++ handles deci...
In general, C++ programming language follows a sequential execution approach. The first statement is executed and then the compiler moves to the next statement in line. In case of conditional state...
An operator is used to perform operations. There are many types of operations in C++. These include arithmetic, logical and bitwise.
The below operators perform different types of operations in C...