Point out the error in the following program
#include
#include
void varfun(int n, ...);

int main()
{
varfun
(3, 7, -11, 0);
return 0;
}
void varfun(int n, ...)
{
va_list ptr;
int num;
num = va_arg(ptr, int);
printf("%d", num);
}

Error: ptr has to be set at begining
 
Error: ptr must be type of va_list
 
Error: invalid access to list member
 
no error
 

Answer

A Foxoyo User

Statistics

0 Level
0
Attempts
0
Accuracy
0
Bookmark
0
Tags

Quizes

Related Questions