Like the pointer subtraction, we can also compare the pointer but pointer should be pointed to the same array or memory block.
See the below example;
Assigning address of first and third elements of acBuffer1 to pc1 and pc2.
But pointers comparison is invalid when pointers point to the 2 different memory blocks.
See the below example;
Assigning the address of acBuffer1 to pc1 and acBuffer2 to the pc2.
In that situation pointer comparison is invalid.