#include <stdio.h>
int main ()
{
void putBinary (int);
putBinary (12);
putBinary (-12);
return 0;
}
void putBinary (int n)
{
int bits = sizeof (n)*8;
while (birts --> 0)
{
printf ("%d" , n >> bits & 1);
if (bits % 4 ==0)
printf ("");
}
printf ("\n");
}
谁能解释一下 |
|