Cognizant interview question

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