(part 5) Han from China answers your C questions



a question abou "atoi"
66650...@xxxxxx said:
First,thanks for all who have answered my last question.

if char string[20]="12345";

how could I convert the string[2](that is "3") to an int by using
atoi? I only want to convert string[2],not other string[i].

int a;
char string[20]="12345";

atoi((a=string[2]-'0',"X"));


Yours,
Han from China

.