by Dinesh Thakur Category: Puppetting On Strings

The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa The following functions can be used to convert integers to strings :

Function Name                      Purpose

itoa() : Converts an integer value to a string.
ltoa() : Converts a long integer value to a string.
ultoa() : Converts an unsigned long integer value to a string.

The following functions can be used to convert floating-point values to strings :

Function Name                      Purpose

ecvt() : Converts a double-precision floating-point value to a string without an embedded decimal point.
fcvt() : Same as ecvt(), but forces the precision to a specified number of digits.
gcvt() : Converts a double-precision floating-point value to a string with an embedded decimal point.



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.