3 ms·
The printf commands say "the address of..." but proceed to print out the value, not address.
by stirner 10y ago
The printf commands say "the address of..." but proceed to print out the value, not address.
- hmottestad 10y agoLooks fine to me. An address is just a number, this one being hex encoded.
- stirner 10y agoOkay. In my experience "the address of x" is taken to be synonymous with "&x", but I suppose that's a pedantic difference.
- hmottestad 10y agoarr is an array. So printing arr[0] would print the contents within the first position of arr, and &arr[0] would print its address. However if you simply print arr, then that's not the contents of the array, so it will print the address. &arr[0] should print the same as arr.