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
what is the difference between 123 and 0123 in c?
What is data types?
What is %d called in c?
List the different types of c tokens?
Can static variables be declared in a header file?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
How can I recover the file name given an open stream?
What are local static variables? How can you use them?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What are the salient features of c languages?
What is data structure in c and its types?
Why pointers are used?
What is I ++ in c programming?
How can you increase the allowable number of simultaneously open files?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.