#include int main() { int i=10,j=20,diff; diff=&j-&i; printf(\"\\nAddress of i=%u Address of j=%u\",&i,&j); printf(\"
Computing the difference between pointers that do not point into the same array (as in your case) is undefined behavior in C. See this for more information and references.