I found this piece of code, and I don't understand what it means. Do we have the right to use the array notation like here?
double *myList = malloc(3 * sizeof(double));
myList[0] = 1.2;
myList[1] = 2.3;
myList[2] = 3.4;
EDIT : I think this notation uses the fact that the memory address of myList[0],myList[1],myList[2] are consecutive. malloc() doesn't guarantee that the addresses are allocated consecutively.