Two pointers that point to different arrays cannot be compared meaningfully.
That's false right? because they can be compared in the same manner as integers are correc? if i am wrong please explain y or if u have anything to add please do!!!
Jump to Post
One reason to compare pointers is to compare two pointers for equality (or inequality) to determine if they are pointing to the same thing, or not. Or if a pointer is pointing to anything at all (ie. ptr != NULL ).
Otherwise, using > or < comparison, it's …
All 4 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.