WD Interview Question

Write a C function transfer a char string contains 0-9 into int