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 ?

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


Please Help Members By Posting Answers For Below Questions

What does c mean in standard form?

1245


What is the difference between c &c++?

1208


Is c object oriented?

1013


What are linker error?

1150


Differentiate abs() function from fabs() function.

1071


Write a program to print factorial of given number using recursion?

1063


List some basic data types in c?

1082


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2924


What is n in c?

1112


Explain spaghetti programming?

1320


What is difference between constant pointer and constant variable?

1399


Explain the advantages of using macro in c language?

1046


Explain what is the benefit of using #define to declare a constant?

1275


Tell me what is the purpose of 'register' keyword in c language?

1039


What does s c mean in text?

1144