Question d’entretien chez Cognizant

How to sort using for loop in C++