I dont know whether you want to compare the memory location of its value,
if you want to compare the address then the pointer variable itself holds the address it points to since it is numerical we can compare directly.

if you want to compare based on its value then dereference the pointer and compare with it,

I do not know whether I answered your question , If I am wrong please give me more details and please be specific.