Give a oneline C expression to test whether a number is a power of 2?
#include<stdio.h> main() { int n,c=0,i; for(i=0;i<(sizeof(n)*8);i++) if(n&(1<<i)) c++; if(c==1) printf("%d is powwer of 2",n); else printf("%d is not a power of 2",n); }