fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main(){
  4. double a = 1231.23123;
  5. char b[32];
  6. sprintf(b, "%f",a);
  7. printf("%s\n",b );
  8. char c[32] = "1231.23123";
  9. if (strcmp(c,b) == 0){
  10. printf("SUCCES\n");
  11. }
  12. else{
  13. printf("DIFFER\n");
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 1832KB
stdin
Standard input is empty
stdout
1231.231230
DIFFER