Answer Posted / swetcha
Variable-argument functions in C are inherently unsafe
since there is no language-level mechanism to ensure that
the actual arguments agree in type and number with the
arguments that the function will be using. There are
several ways to implement variable argument functions in C
You can try to implement such function by taking the
address of a formal argument and working your way through
the stack frame.A better alternative is to use the
__builtin_next_arg function on gcc and then work your way
up the stack. You can write your variable argument
functions using the standard macros in <stdarg.h> and
<vararg.h>.
Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Explain indirection?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Add Two Numbers Without Using the Addition Operator
What is a memory leak? How to avoid it?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
What language is windows 1.0 written?
What are static variables in c?
Why header files are used?
What are the disadvantages of a shell structure?
What does do in c?
What's the right way to use errno?
Why we use int main and void main?
Explain what are multidimensional arrays?
how is the examination pattern?
What are the header files used in c language?