0

I have seen code which uses a double not (!!) for checking a pointer.But I am not finding an advantage of using !! in the condition check.Can some one shed some light on the purpose and advantage of using it.

int *Ptr;
/* ... */
if(!!Ptr)
{
  /* ... */
}
Hcorg
  • 10,126
  • 3
  • 29
  • 35
achoora
  • 1,240
  • 1
  • 15
  • 30

0 Answers0