AKM wrote:
> Hi,
> In the protype of printf function, what does the ... mean.
> int printf(const char *format, ...)
It means it takes a variable number of arguments.
> I undestand that this function can take variable number of arguements.
> How is it handled? what is it called?
It is handled by first initializing an object of type va_list using
va_start(list,last_specified_argument)
and then removing every additional argument by
va_arg(list,type)
Finally, va_end(list) is required before leaving the function to clean
up. All of that is defined in <stdarg.h>
Greetings,
Thomas
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.


|