Run-time or Dynamic memory Allocation and Deletion in C++ using “New” operator

While programming it is extremely important, whenever we dynamically allocate the memory we have to delete it, otherwise, the memory will remain captured even tho your program has been exited. It is always a good practice to release the memory which allocated dynamically. You do not have to worry about compile time memory. It will […]

Factorial in C++ (Recursive and iterative approach)

What is the Factorial of a number: Factorial is the product of all the positive integers between 1 and a given positive integer. The given positive integer itself would also be included in the product. Factorial is represented as n! where n is a given positive integer. Here is an example of how we can […]