Atoi (representing alphanumeric to integer) is a function that converts a string into an integer number http://baike.baidu.com/link?url= Vtp54jt5-ey5tl0gffd49bgrgk7x-cjgu6onypmms694itag7fsazs_0k3ixdaxukvumknxt5ap1xacuopq7pk
#include <stdlib.h>int main (void) { int n; Char " 12345.67 " ; = atoi (str); printf ("int=%d\n", N); return 0 ;}
The
Itoa is a widely used non-standard C language extension function. Because it is not a standard C-language function, it cannot be used in all compilers. However, most compilers (such as those on Windows) typically include this function in the <stdlib.h> header file. Http://baike.baidu.com/link?url=VTP54JT5-EY5TL0GFfd49bGrgK7x-CjgU6onYPMMS694itag7FSAZs_ 0K3IXDAXUKVUMKNXT5AP1XACUOPQ7PK
#include <stdlib.h><stdio.h>int main (void) {int number= 123456 ; Char string [];itoa (number,string,ten);p rintf (" integer=%d string=%s\n", number,string); return0;}
View Code
C system functions for Integer to character to integer