The malloc function is a function used in C/C++ and various other high-level programming languges to add memory to the heap, it is essentially a pointer
int* X = malloc(sizeof(int));
Where the parameter to malloc is the number of bytes you want to make room for. Because we are using an integral variable we want to make as much room as an integer takes.
Copyright © 2026 eLLeNow.com All Rights Reserved.