Adcole interview question

How would you write a function to reverse a string? Code a function to find the smallest armstrong number under 1000.