#include <stdio.h>
int main()
{
int i = 0, *ptr = &i;
*ptr = *ptr ? 1 : 2;
printf("Val = %d\n", i);
return 0;
}
References: C From Theory