C Programming and Technical Programming Program

Point out the error in the following program.
#include
#include
fun(...);

int main()
{
fun(3, 7, -11.2, 0.66);
return 0;
}
fun(...)
{
va_list ptr;
int num;
va_start(ptr, n);
num = va_arg(ptr, int);
printf("%d", num);
}
Options
1) Error: fun() needs return type
2) Error: ptr Lvalue required
3) Error: Invalid declaration of fun(...)
4) No error

Read Solution (Total 1)

C Other Question

What will be the output of the program?
#include

int main()
{
int y=128;
const int x=y;
printf("%dn", x);
return 0;
}
Options
1) 128
2) Garbage value
3) Error
4) 0
What is the purpose of fflush() function.

Options
1) flushes all streams and specified streams.
2) flushes only specified stream.
3) flushes input/output buffer.
4) flushes file buffer.