need help to make it shorter

I wrote this code in C to reverse string or numbers. need help to shrink it down.-c-png