Cognizant interview question

Many Basic coding qus like reverse of a no