```
/*
find out of an integer entered is a power of 2
*/
#include<stdio.h>
int main(void)
{
int n, z1;
char c[2][30]={"is not a power of 2","is a power of 2"};
printf("Enter integer to find out if power of 2: ");
scanf("%d",&n);
/* test */
z1 = (n & (n-1));
if ((n & (n-1))==0) printf("\ntrue\n");
printf("\n%d %s\n",n, c[((n & (n-1))==0) ? 1 : 0]);
getchar(); /* catch enter */
getchar(); /* wait */
return 0;
}
```

The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.