Tag Archives: C++

C++ Arrays

An Array is a collection of similar data types (homogenous data type) elements that store at a contiguous memory location and using the indices or index values we can access the random element from that collection. An array is only capable of storing similar data type which means if we have an array of integer,… Read More »

Exception Handling in C++

In C++ we have the concept of exception handling in which we deal with error occur at runtime. Here in this article we have mentioned what are exceptions and what is exception handling. What are exceptions in C++? Exception is a technical term in programming given to the runtime error. Exceptions are the errors generally… Read More »

C++ Dynamic Memory

C++ is a statically typed programming language, but it also supports the concept of Dynamic memory allocation, in dynamic memory allocation the memory allocated to the variable at runtime. Sometime situation could arise where we require dynamic data, that means the data keeps changing during runtime, for example, if we create a program for employee… Read More »

Namespaces in C++

In a C++ program if we redefine a variable or function with the same name in the same scope then the compiler would throw an error “has a previous declaration”. Example #include <iostream> using namespace std; int main() {    int x= 10;    double x= 20;    cout<<x; } Output (ERROR) Compiler Error: ‘x’… Read More »

C++ Templates

The template is one of the powerful tools of C++ and it is often used to eliminate the concept of function overloading where the function has a similar function definition, with the same number of parameters but different data types. For example, if we want to make a function that compares two objects and returns… Read More »

C++ Preprocessor

Preprocessors are the special piece of code that we use in our program, and a preprocessor processes our program before compilation. There are many processes that include compiling and executing a program in C++. The process of Compiling a source code and Executing the code: First, we save our source code as .cpp file. And… Read More »

C++ Signal Handling

In C++ we have the concept of signals, which are used to interrupt the ongoing task of the Operating System.  Signals are basically messages given to the Operating System by the program to pause a service that is currently running on the operating system. C++ Signal Handling In C++ we can use a signal to… Read More »

C++ Multithreading

Threading generally represents a part of the process which is at running state, in C++ we get the feature of multi-threading which allows us to perform multitasking which means we can run two or more than two programs concurrently. There are two types of Multi-tasking: Process-based Multi-tasking Thread-based Multi-tasking Process-Based Multitasking The process-based multitasking concerned… Read More »

Data Abstraction in C++

Data Abstraction is one of the most important features of Object-Oriented Programming language. The concept of Abstraction deal with data and information hiding means in abstraction we try to hide as much as data from the user and only give access to some of its features. For instance, we all know cout<< is an object… Read More »

C++ vs Python in 2020

It’s 2020, a new decade has been started and in the last decade many technologies relegated and many emerged. This cycle of dwindling old tech and emerging new one is not new that’s why it’s said in computer science focus on the logic and algorithms more than programming languages and technologies. Here in this article,… Read More »