c++ - the functionalities of two lines of code -
When I was trying to learn from an existing program, I could not understand that trying the following two lines ?
 for (i = 0; 0 == (x & amp; 1); ++ i) x >> gt; = 1; If (0 == (x- = y)) return    Any explanation will be appreciated. 
  
 for  (I = 0; 0 == (x & amp; 1); ++ i) x >> gt; = 1    sets the least important bit to  1  in an integer 
  if (0 == ( X- = y)) Return y & lt; & Lt; I; Removes  x  from     , and if the result is 0, returns  y  More important bits by  i  bits. 
 
Comments
Post a Comment