Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
langc
#include <stdarg.h>
#include <stddef.h>

void func(size_t numArgsnum_vargs, const char *cp, ...) {
  va_list ap;  
  va_start(ap, cp);
  if (numArgsnum_vargs > 0) {
    int val = va_arg(ap, int);
    // ...
  }
  va_end(ap);
}
 
void f(void) {
  func("The only argument", 0);
}

...