1.

How To Convert A String To A Number?

Answer»

The standard C library provides several functions for converting STRINGS to numbers of all formats (integers, longs, floats, and so on) and VICE VERSA.

The following functions can be used to convert strings to numbers:
Function Name Purpose

  • atof(): Converts a string to a double-precision floating-point VALUE.
  • atoi(): Converts a string to an integer.
  • atol(): Converts a string to a LONG integer.

The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa.

The following functions can be used to convert strings to numbers:
Function Name Purpose



Discussion

No Comment Found