wap to check whether an integer is a power of 2.. February 24, 2014 #include<stdio.h> main() { int n,i; printf("\nenter the number\n"); scanf("%d",&n); i=n-1; if((n&i)==0) printf("\ninteger is a power of 2\n"); else printf("\ninteger is not a power of 2\n"); } Read more