1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream> using namespace std; int main() { int x = 5; int count=0; while(x) { count++; x = x&(x-1); } return count; return 0; }
1
Exited: ExitFailure 2