Compiled successfully but prints nothing

playing with bits, Bitmasking

for(j=a[i];j<=b[i];j++)
		{
			while(j>0)
			{
				sum = sum+(j&1);
				j=j>>1;
			}
		}

In thids part, running for and while loops with same j???
This would never terminate.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.