Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
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?
✍: FYIcenter
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.
PARAMETERS -
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, 8840👍, 0💬
Popular Posts:
What Are the Parameter Modes Supported by PL/SQL? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
Give me the example of SRS and FRS SRS :- Software Requirement Specification BRS :- Basic Requiremen...
How To Retrieve the Count of Updated Rows? - Oracle DBA FAQ - Working with Database Objects in PL/SQ...
What Is Paint Shop Pro? - PSP Tutorials - Fading Images to Background Colors with PSP Paint Shop Pro...
How To Create an Add-to-My-Yahoo Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...