#Meta-Wlp: #Macro: TITLE wlp: Learn C (IV) p. 9
Sometimes, two pointers can be subtracted, but they can never be added.
Is this the same program as the previous?
#include<stdio.h> int count_backwards( int * z, int * ip ) { while (z!=ip) printf("%d, ", *ip-- ) ; printf("%d\n",*ip) ; } int main(){ int my_count[3] ; my_count[0] = 0 ; my_count[1] = 1 ; my_count[2] = 2 ; count_backwards( my_count, my_count+2 ) ; }#Shuffle: none $PAGE$-A $PAGE$-B Return to Learn C Table of Contents #: Yes, it is the same. #: No, it is not the same. #: