Is an array with 0 elements the same as an unallocated pointer?
Is int arr[0]; same as int* arr; ?
Edit: what if I did something similar to this:
int x[0]; int* const arr = x;
I tried this code and compiled it. As far as I know, both x and arr should point to the same place in memory. What is the difference in this case?
c ++ arrays pointers
Dasaru
source share