Skip to content

Instantly share code, notes, and snippets.

@vansika
Created August 2, 2019 11:30
Show Gist options
  • Save vansika/b200f9e79bb251e8cbd521527c8c58fd to your computer and use it in GitHub Desktop.
Save vansika/b200f9e79bb251e8cbd521527c8c58fd to your computer and use it in GitHub Desktop.
num = 2017
int start(int num)
{
int count = 0;
while (num > 0) {
++count;
num = (num - 1) & num;
}
return count;
}
}
a)25
b)1
c)7
d)8
Ans) c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment