+ 2

Plz explain 7th line of code and hence the output?

C challenge question.plz explain how can we subtract pointers. https://code.sololearn.com/cAFMEogMZJO3/?ref=app

20th Dec 2021, 10:15 AM
gaurav kumar
gaurav kumar - avatar
1 ответ
+ 2
Pointer points to memory blocks. If you do pointer++, you will point to the next memory block. And if you subtract pointer and pointer++, you will get the difference in memory blocks, which is 1 in this case: https://stackoverflow.com/questions/3238482/pointer-subtraction-confusion
20th Dec 2021, 12:51 PM
Coding Cat
Coding Cat - avatar