Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* converted = ConvertDoubleToStr(666654);
- printf("Converted string: %s n", converted);
- return 0;
- char* ConvertDoubleToStr(double d)
- {
- printf("Input: %lf nn", d);
- const int length = sizeof (double);
- char result[length] = " ";
- sprintf(result, "%g", d);
- printf("Double -> Str. : %s n", result);
- return result;
- }
Add Comment
Please, Sign In to add comment