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
Why is c called a mid-level programming language?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
what is the difference between 123 and 0123 in c?
Can we change the value of constant variable in c?
Is c easier than java?
What are the differences between Structures and Arrays?
How to get string length of given string in c?
Why should I use standard library functions instead of writing my own?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Explain built-in function?
What are the types of functions in c?
How many types of sorting are there in c?
Why c is called procedure oriented language?
Write a program to generate the Fibinocci Series
Explain union. What are its advantages?