If you need to store the zipcode in a character array zipcode[] , you can use this:
snprintf( zipcode, 6, "%05.5d", atoi(zipcode));
If you need to store the zipcode in a character array zipcode[] , you can use this:
snprintf( zipcode, 6, "%05.5d", atoi(zipcode));