Cognizant Interview Question

I have given to write a code in c++ to sort array