We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Category: C++ Interview Questions

Designing a Thread Pool Framework Part 1: What’s the need of a Thread Pool

ThreadPool

In this we will discuss what is a Thread pool and why do we need Thread Pools. Many times you encounter a situation where where you need to perform several tasks in parallel to improve the performance of application. These Tasks can be anything like, Advertisements Encrypting a file. Calculating hash of a file. Performing …

Designing a Thread Pool Framework Part 1: What’s the need of a Thread PoolRead More

How does new and delete operator works internally ?

In this article we will discuss how new and delete operator works internally in C++.new operator is used to dynamically allocate memory on heap and delete operator is used to delete the memory from the heap allocated by new operator. Usage example of new and delete operator is as follows, #include <iostream> class Sample { …

How does new and delete operator works internally ?Read More

Difference between delete & []delete and rise of Memory Leaks

In this article we will discuss the difference between delete &  []delete and how mixing new [] with delete can give rise to Memory Leaks. To allocate memory dynamically on heap we use new[] operator i.e. Advertisements class Sample; Sample * ptrArr = new Sample[5]; Here new[] performs following operations internally, In first step, it …

Difference between delete & []delete and rise of Memory LeaksRead More

Overloading new and delete operators at Global and Class level

In this article we will discuss why we should overload new and delete operator and how to do it. When we create a new Object on heap by calling new operator then it does following things internally, Advertisements First it allocates the required memory by calling operator new i.e. operator new returns the pointer top …

Overloading new and delete operators at Global and Class levelRead More

what’s placement new operator and why do we need it.

In this article we will discuss what is placement new operator and what’s its need. Need of placement new operator Every when we create a new object using new operator, memory is allocated on heap i.e. Advertisements int * ptr = new int; But there might be scenarios when we want to dynamically create an …

what’s placement new operator and why do we need it.Read More

How to pass variable arguments in a function

In this article we will discuss how to pass variable number of arguments in a function. Requirement: Advertisements Suppose I want to create a function that take variable number of arguments and use them to perform some task. For example, Create a function that will return the sum of all the passed arguments i.e. Frequently …

How to pass variable arguments in a functionRead More

Cart

Your Cart is Empty

Back To Shop