Category: Programming Interview Questions
Allocating and deallocating 2D arrays dynamically in C and C++
In this article we will see how to allocate and deallocate 2D arrays dynamically using new / delete and malloc / free combinations. Suppose we want to create a 2D array using pointers on heap either using new or malloc. It should function like this, Advertisements int row = 2; int col = 3; int ** …
Allocating and deallocating 2D arrays dynamically in C and C++Read More
What is a Memory Leak in C++ ?
In this article we will discuss what is Memory Leak C++ and why its harmful for applications. Memory Leak Advertisements Memory leak in is a kind of Bug that kills your application slowly by first making it slow and then eventually crashing it. How Does Memory Leak happens: Frequently Asked: What is a Memory Leak …
What is std::deque and how deque works internally.
In this article we will discuss what is a deque and how it works internally. Deque is a double ended queue container that provides insertion and deletion at both ends i.e. front and back with high performance unlike vector that provides high performance insertion at end i.e. back only. Advertisements [showads ad=inside_post] Also it provides …