Variadic function: Difference between revisions

Content deleted Content added
Examples: Add the C23 changes to variadic functions and explain the C++ situation
Examples: Update code comment
Line 30:
double sum = 0;
 
va_start(ap, count); /* Before C23: Requires the last fixed parameter (to get the address) */
for (j = 0; j < count; j++) {
sum += va_arg(ap, int); /* Increments ap to the next argument. */