EmbLogic's Blog

what is the error in following code?

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

int main()
{
varfun(3, 7, -11.2, 0.66);
return 0;
}
void varfun(int n, …)
{
float *ptr;
int num;
va_start(ptr, n);
num = va_arg(ptr, int);
printf(“%d”, num);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>