Write a program to implement comparison of two pointers.
#include <stdio.h>
int main()
{
int *ptrA,*ptrB;
ptrA = (int *)1;
ptrB = (int *)2;
if(ptrB > ptrA)
printf("PtrB is greater than ptrA");
else
printf("PtrA is greater than ptrB");
return 0;
}
Output
PtrB is greater than ptrA