Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
#include<stdarg.h>
void dumplist(int, ...);
int main()
{
dumplist(2, 4, 8);
dumplist(3, 6, 9, 7);
return 0;
}
void dumplist(int n, ...)
{
va_list p; int i;
va_start(p, n);
while(n-->0)
{
i = va_arg(p, int);
printf("%d", i);
}
va_end(p);
printf("\n");
}
A.
2 4
3 6
B.
2 4 8
3, 6, 9, 7
C.
`
4 8
6 9 7
D.
1 1 1
1 1 1 1
Options:
A .  Dogs 12
B .  Cats 14
C .  Boys 13
D .  Apple 12
Answer: Option D

Answer: Option C



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers