[S'enregister] - [S'identifier]
gheop wall

%

C
par SiB (02/10/07)
Cacher les numéros de lignes
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdarg.h>
  4.  
  5. static void myprintf(char *string, ...) {
  6. va_list list;
  7. va_start(list,string);
  8. vprintf(string,list);
  9. va_end(string);
  10. }
  11.  
  12. int main(void) {
  13. char hello[] = "hello world\n";
  14. myprintf("HELLO WORLD\n");
  15. myprintf("%d * %d = %d\n",20,5,20*5);
  16. myprintf("%s",hello);
  17. return 1;
  18. }
  19. /*
  20. affiche
  21. HELLO WORLD
  22. 20 * 5 = 100
  23. hello world
  24. */