Quantcast
Channel: Printing leading 0's in C - Stack Overflow
Viewing all articles
Browse latest Browse all 12

Answer by JeeBee for Printing leading 0's in C?

$
0
0

Zipcode is a highly localised field, many countries have characters in their postcodes, e.g., UK, Canada. Therefore in this example you should use a string / varchar field to store it if at any point you would be shipping or getting users/customers/clients/etc from other countries.

However in the general case you should use the recommended answer (printf("%05d", number);).


Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>