This gives a clear explanation: #include<stdio.h> main(){ int *i,*j; i=(int*)60; j=(int*)71; printf <http://www.opengroup.org/onlinepubs/009695399/functions/printf.html>("%p %p %d",i,j,j-i);}
op: 0x3c 0x47 2 0x47 - 0x3c = 0x11 and hence j-1 = 2 (11/4 = 2, size of int = 4 bytes) On Sat, Oct 13, 2012 at 3:36 PM, bharat b <bagana.bharatku...@gmail.com>wrote: > #include<stdio.h> > main() > { > int *i,*j; > i=(int*)60; > j=(int*)71; > printf("%d",j-i); > } > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.