That will the following code fragment display?

int n = 33;
int s = 0;
while (n > 0) {
    s += n % 2;
    n /= 2;
}
System.out.println(s);
Explanation
Get an explanation when it's available:

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback