Basic and Advance C Question:
Download Job Interview Questions and Answers PDF
My compiler isnt letting me declare a function
Answer:
My compiler isn't letting me declare a function
int f(...)
{
}
i.e. accepting a variable number of arguments, but with no fixed arguments at all.
A: Standard C requires at least one fixed argument, in part so that you can hand it to va_start. (In any case, you often need a fixed argument to determine the number, and perhaps the types, of the variable arguments.)
int f(...)
{
}
i.e. accepting a variable number of arguments, but with no fixed arguments at all.
A: Standard C requires at least one fixed argument, in part so that you can hand it to va_start. (In any case, you often need a fixed argument to determine the number, and perhaps the types, of the variable arguments.)
Download C Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
I have a varargs function which accepts a float parameter | How can I discover how many arguments a function was actually called with? |