Give a oneline C expression to test whether a number is a power of 2?
main() { int a; scanf("%d",&a); if((a+(a-1))==((a<<1)-1)) printf("it is powers of 2"); else printf("not powers of 2"); }