[ create a new paste ] login | about

Link: http://codepad.org/fVTTZkdO    [ raw code | output | fork ]

C, pasted on Mar 22:
#include <stdio.h>

int main()
{
 int i, j, k;
 union u 
 {
      float a;
      char b[4];
 } f;
 f.a = -121.3;
 for(j=0;j<4;j++)
 {            
              for(i = 1; i != 9; i++)
 {
 printf("%d",(f.b[j] & 128)==128?1:0);
 f.b[j] = f.b[j] << 1;      
 }
 }
 scanf("%d");
 return 0;
}


Output:
1
10011010100110011111001011000010


Create a new paste based on this one


Comments: