Types of Allocation

Study types of allocation.

Introduction

In C++, we can allocate memory in two ways:

  • Static allocation
  • Dynamic allocation

Static allocation


In static allocation, a fixed amount of memory is allocated to the variables or arrays before the execution of the ...