S
syn1kk
1: float (*data)[16384];
2: data = malloc(31 * sizeof(data[0]));
3: data[j] = VARIABLE;
Question 1: The variable data is a float pointer?
Question 2: When the [16384] is used. Does that mean it is an array of
float pointers? What does it mean?
Question 3: Or does it mean that there are 16384 floats allocated with
the pointer data that points to the head of those 16384 floats?
Question 4: It will malloc 31*16384 floats... I assume this is true
based on how the program uses it. But shouldn't it be mallocing
31*sizeof(float*)?
Question 5: Then the code starts using data as a multidimensional
array. When did it become a multidimensional array?! and how did it
become multidimensional?!
2: data = malloc(31 * sizeof(data[0]));
3: data[j] = VARIABLE;
Question 1: The variable data is a float pointer?
Question 2: When the [16384] is used. Does that mean it is an array of
float pointers? What does it mean?
Question 3: Or does it mean that there are 16384 floats allocated with
the pointer data that points to the head of those 16384 floats?
Question 4: It will malloc 31*16384 floats... I assume this is true
based on how the program uses it. But shouldn't it be mallocing
31*sizeof(float*)?
Question 5: Then the code starts using data as a multidimensional
array. When did it become a multidimensional array?! and how did it
become multidimensional?!