Cognizant interview question

Write C program to reverse a String