Xoriant interview question

1. Write a program to convert String to int.