warcsum/warcsum.c
/*
 * Converts 5 bits integers to binary char array
 */
Converts 5 bits integers to binary char array
Converts 5 bits integers to binary char array
int
int_to_bin (int n, char* out)
{
  int i = 5;
  while (i--)
    {
      if (n % 2)
        {
          out[i] = '1';
        }
      else
        {
          out[i] = '0';
        }
      n /= 2;
    }
  return 0;
}
int int_to_bin ( int n , char * out ) { int i = 5 ; while ( i -- ) { if ( n % 2 ) { out [ i ] = ' ' ; } else { out [ i ] = ' ' ; } n /= 2 ; } return 0 ; }
Converts 5 bits integers to binary char array
Converts 5 bits integers to binary char array