6
What will be the output of the program?
#include <stdio.h>
#include <stdarg.h>
int count(const char *first, ...) {
va_list ap;
int n = 0;
const char *s = first;
va_start(ap, first);
while (s) { n++; s = va_arg(ap, const char *); }
va_end(ap);
return n;
}
int main(void) {
printf("%d\n", count("a", "b", "c", (char *)NULL));
return 0;
}DiscussHard