varargs.c
changeset 27 81a574d60c15
parent 9 c3fecc82ade6
child 29 7abf6146898e
equal deleted inserted replaced
26:d227047a3e88 27:81a574d60c15
     8 #include <stdarg.h>
     8 #include <stdarg.h>
     9 
     9 
    10 int params (char *fmt, ...)
    10 int params (char *fmt, ...)
    11 {
    11 {
    12     int i = 0;
    12     int i = 0;
       
    13 
    13     va_list list;
    14     va_list list;
       
    15 
    14     char c;
    16     char c;
       
    17 
    15     char *s;
    18     char *s;
       
    19 
    16     int value;
    20     int value;
    17 
    21 
    18     va_start (list, fmt);
    22     va_start (list, fmt);
    19 
    23 
    20     while (*list) {
    24     while (*list) {