bool isPowerOfTwo (int x){ /* First x in the below expression is for the case when x is 0 */ return x && (!(x&(x-1)));}Read full article from Write one line C function to find whether a no is power of two | GeeksforGeeks
bool isPowerOfTwo (int x){ /* First x in the below expression is for the case when x is 0 */ return x && (!(x&(x-1)));}Read full article from Write one line C function to find whether a no is power of two | GeeksforGeeks
No comments:
Post a Comment