Hi all,
Code:
ptr = malloc(number*sizeof(int));
I am using the following line to allocate memory - I understand that malloc requires an integer value as its arguement. In the example above the variable 'number', will be a integer that is entered by the user in order to specify how many integers they want to create in an array. I can see from the statement that the value of 'number' will be multiplied by 'sizeof(int)'.

My question is this, Is there a default value of 'sizeof' that is being used to multiply with the variable 'number', because i don't not understand what is being multiplied.

i.e. if the user enters '5', then..... 5 * sizeof. So whats the value of 'sizeof'.?