InterviewSolution
Saved Bookmarks
| 1. |
Consider the following C++ function f() :unsigned int f(unsigned int n){ unsigned int b=0;while(n){b+=n&1;n>>=1;} return b;}The function f() returns the int that represents the___p___in the binary representation of positive integer n, where P is(A)number of00’s(B)number of bits(C)number of consecutive1’s(D)number of1’s |
| Answer» | |