型変換関数

型変換する際の関数を挙げます。詳細は、各自で調べて下さい。

文字列をint型にする

int atoi( const char *s )

文字列をdouble型にする

double atof(const char *nptr);

文字列をlong型にする

long atol(const char *nptr);

数値を文字列にする

int sprintf(<変換前の文字列変数(配列、ポインタ)>, const char * restrict format, <変換後の変数>);
//例)
sprintf(s1, "%d", i);

sprintfのフォーマットの書き方は、printfを参考にすればいいでしょう