flags.c 252 B

12345678910
  1. /* flags.c -- illustrates some formatting flags */
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. printf("%x %X %#x\n", 31, 31, 31);
  6. printf("**%d**% d**% d**\n", 42, 42, -42);
  7. printf("**%5d**%5.3d**%05d**%05.3d**\n", 6, 6, 6, 6);
  8. return 0;
  9. }