for( i = n, j = 0; i > 0; i /= 2, j +=i )
Why There is no condition check for j here
you can declare as many variables in for as you want. You will check conditions based on your requirement. Here the writer might not want j to act as a control variable governing the number of times loop runs so he didnt apply any condition check which indeed is perfectly normal.