Advertisement
baldengineer

Leading 0s

Dec 19th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void main() {
  4.         int segment1 = 1234;
  5.         int segment2 = 4321;
  6.         printf("%08d%08d\n", segment2, segment1);
  7.  
  8. }
  9. // output is:
  10. // 0000432100001234
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement