Why we use malloc () and calloc () in the programs.
They are used to dynamically allocate memory on the heap, which is a much larger memory pool than static allocated memory. Malloc takes one parameter(size of the memory), allocates it but leaves it uninitialized(garbage values). Calloc takes two arguments (number of blocks to allocate and size of each block), allocates it and initialize all of it to 0.
When you write code, try not to leave any space between the malloc/calloc keywords and the parentheses if you want to avoid syntax errors.
But we can use malloc/calloc for memory is use to save or memory allocation.
Because you are not always sure what amount of memory you will use at compile time. Therefore it can be useful to be able to dynamically allocate memory
Not sure what you mean by that