Guest User

Untitled

a guest
Feb 18th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. char* converted = ConvertDoubleToStr(666654);
  2. printf("Converted string: %s n", converted);
  3. return 0;
  4.  
  5. char* ConvertDoubleToStr(double d)
  6. {
  7. printf("Input: %lf nn", d);
  8. const int length = sizeof (double);
  9. char result[length] = " ";
  10.  
  11. sprintf(result, "%g", d);
  12. printf("Double -> Str. : %s n", result);
  13.  
  14. return result;
  15. }
Add Comment
Please, Sign In to add comment