Please explain this

here it is an address and arr is also address how their diff is giving diff between indexes.

yes both are address
arr is first element address
it is address of element which we have to search

for example
address of it and arr are
0x7ffd595fc308 0x7ffd595fc300 resp
now according to you difference should be 8
but as they are addresses of int so they are not subtract as intergers
they are subtracted and also divided by sizeof(int) interially

so this is why there difference gives index
i hope you understand it