Two pointers comparison -


pf1==pf2    pf1 , pf2 point same array element  pf1>pf2     pf1 higher address location  pf1<pf2     pf2 lower  address location 

i want know if third sentence should be:pf2 higher address location

the third statement should either:

  • pf2 higher address location
  • pf1 lower address location

these statements equivalent in context. original quote got caught not making mind of 2 correct statements wanted make , ended being erroneous combining them.

under memory addressing schemes such segmented addressing on 8086, possible have 2 different values segment:offset refer same address (because segments overlap). depending on whether (or how) pointer values normalized before comparison, might have pf1 < pf2 pointers still refer same address. however, sufficiently esoteric you're unlikely ever run such problem in practice.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -