In this program, suppose that the array begins with 2000, then the elements must be present in the memory cells arr [1] = 2004 and arr [5] = 2020. and if so, then (ji) should give 16, the difference between memory cells j and i. But it gives a value of "4 for ji. Why does it not give a value of 16?
main() { int arr[]={10,20,30,45,67,56,74}; int *i,*j; i=&arr[1] ; j=&arr[5] ; printf ("%d %d",ji,*j-*i); }
source share