In the book I'm learning C from, the following example is given:
Am I correct in reading this as:Code:/* allocate memory for an array of 50 integers */ int *numbers; numbers = (int *) malloc(50 * sizeof(int));
1) numbers is the pointer to the first address in the allocated block
2) (int *) tells malloc the data type of what is going into that block
3) malloc(50 * sizeof(int)) allocates a block of memory 50 times the byte size of int
?
Thanks!