Which of the following should be true for pointers subtraction to make sense?
Explanation
Pointer subtraction yields the number of array elements between two pointers of the same type. For example,

int arr[5] = /* initializer here */;
&arr[5] - &arr[0];  // yields 5, the difference is 5 elements

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback