fbpx

Job interview question: How to get variable arg count for C++ program with va_arg, va_start, and va_end

(Last Updated On: May 18, 2010)

Job interview question: How to get variable arg count for C++ program with va_arg, va_start, and va_end
Do it with with va_arg, va_start, and va_end

/* va_start example */
#include
#include

void PrintFloats ( int amount, …)
{
int i;
double val;
printf (“Floats passed: “);
va_list vl;
va_start(vl,amount);
for (i=0;i NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Subscribe For Latest Updates

Sign up to best of business news, informed analysis and opinions on what matters to you.
Invalid email address
We promise not to spam you. You can unsubscribe at any time.

NOTE!

Check NEW site on stock forex and ETF analysis and automation

Scroll to Top