Microsoft interview question

string to int conversion