fork download
  1.  
  2. #include <stdio.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. float a=12.2,b=12.343;
  7. int x=*((int *)&a);
  8. int y=*((int *)&b);
  9.  
  10. x=x^y;
  11. y=x^y;
  12. x=x^y;
  13. a=*((float*)&x);
  14. b=*((float*)&y);
  15. /*
  16. a=a^b;
  17. b=a^b;
  18. a=a^b;
  19. */
  20.  
  21. printf("%f %f\n",a,b);
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
12.343000 12.200000