Point out the errors in the following program containing a function that takes a variable number
of arguments:
#include
int sum(int argc, ....);
int main(void) {
printf(“Sum of 3 integers = %d\n”, sum(11, 22, 33));
return 0;
}
int sum(int argc, ...)
{
int i, total = 0;
va_list arglist;
va_start(arglist, argc);
for (i = 0; i <>
total += va_arg(arglist);
va_end(arglist);
return total;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here