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)
-
- advantages of using pointers in a program:
1.we can use memory in efficient manner by using dynamic memory allocation;
2.we can handle data structure in very efficient way.
3.we use the call by address and pass by address. - 10 years agoHelpfull: Yes(0) No(0)
C Other Question