I saw on some online sources that they allocate a block of memory for an array of n integers as follows:
memory = (int*) malloc(n*sizeof(int))
What's the role of (int*)
here?
I saw on some online sources that they allocate a block of memory for an array of n integers as follows:
memory = (int*) malloc(n*sizeof(int))
What's the role of (int*)
here?