Program illustrates the output of integer numbers under various formats.
main() { int m = 12345; long n = 987654; printf("%d\n",m); printf("%10d\n",m); printf("%010d\n",m); printf("%-10d\n",m); printf("%10ld\n",n); printf("%10ld\n",-n); } Output 12345 12345 0000012345 12345 987654 -987654