#include <stdlib.h> #include <stdio.h> int main ( void ) { int n; char *str = "12345.67"; n = atoi ( str ); printf ( "string = %s integer = %d\n", str, n ); return 0; }