Dynamic Array Length in C

I'm doing a program that gets the data from user input in to array. But I was wondering how could define the size/lenght of the array dynamically, instead of defining a fixed size like :

#define size 10

void main {
float a[size];
int i;

for (i=0; i<size,i++){
scanf("%f", &v[i]);

How do I make the size/lenght of the array to be, for example, 9 because the user introduce 9 numbers?