Apple Interview Question

Write your own version of atoi().