can we use malloc in c++ code example
Example 1: how to use malloc in c
int* a =(int*)malloc(sizeof(int))
Example 2: cpp malloc
int alloc_size = 10;
int* buffer = (int*) malloc (alloc_size);
//Allocate memory block which can fit 10 integers
Example 3: malloc in c++
void* malloc(size_t size);