Convert an integer or a float to a string
Does there exist any other function which can be used to convert an integer or a float to a string?
Some implementations provide a nonstandard function called itoa(), which converts an integer to string.
char *itoa(int value, char *string, int radix);
DESCRIPTION - The itoa() function constructs a string representation of an integer.
value: Is the integer to be converted to string representation.
string: Points to the buffer that is to hold resulting string. The resulting string may be as long as seventeen bytes.
radix: Is the base of the number; must be in the range 2 - 36.
Another portable solution exists. One can use sprintf():
char s[SOME_CONST]; int i = 10; float f = 10.20; sprintf ( s, "%d %f\n", i, f );
2007-02-26, 7174👍, 0💬
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
Do events have return type ? No, events do not have return type.
What is a fish bone diagram ? Dr. Kaoru Ishikawa, invented the fishbone diagram. Therefore, it can b...
How To Write a Query with a Right Outer Join? - Oracle DBA FAQ - Understanding SQL SELECT Query Stat...
Which bit wise operator is suitable for checking whether a particular bit is on or off? The bitwise ...