Interland interview question

Programs to print star pattern and to reverse a string