Suppose the below statement:
int *numbers, *inverse;
numbers = inverse = (int *)malloc(n * sizeof(int));
I am curious to know what is going on here - I know it is right to left, so first the memory for inverse
is being allocated. Then I set numbers
equal to inverse
, will that mean that the memory location of numbers
will be the same as inverse
? Or does it allocate the same amount of memory at locations &numbers
and &inverse
?
For example, if I do something like inverse[i] = 5
will that mean that numbers[i] == 5
?