Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to implement variable argument functions ?



How to implement variable argument functions ?..

Answer / 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

More C Interview Questions

What are the similarities between c and c++?

0 Answers  


List some basic data types in c?

0 Answers  


why little endian and big endian came?y they using differently? y they not used commonly ?wt is application of little and big ?

1 Answers  


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


Why calloc is better than malloc?

0 Answers  


program to print circle structure

1 Answers  


What is void main ()?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


HOW TO SWAP TWO NOS IN ONE STEP?

16 Answers   Satyam,


Are the expressions * ptr ++ and ++ * ptr same?

0 Answers  


How arrays can be passed to a user defined function

0 Answers  


Categories