Cognizant Interview Question

Sorting in both orders and reverse number code in c language