print1.c 332 B

1234567891011121314
  1. /* print1.c-displays some properties of printf() */
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. int ten = 10;
  6. int two = 2;
  7. printf("Doing it right: ");
  8. printf("%d minus %d is %d\n", ten, 2, ten - two );
  9. printf("Doing it wrong: ");
  10. printf("%d minus %d is %d\n", ten ); // forgot 2 arguments
  11. return 0;
  12. }