↧
Answer by Bernd Elkemann for How does work vararg function calling
There are a few small errors (the first one is what i hinted at in my comment):Function-arguments (here of printf()) are evaluated in any order (not necessarily left-to-right) order. You have to add...
View ArticleAnswer by Abhishek for How does work vararg function calling
This should produce the desired solution.#include <stdarg.h>#include <stdio.h>int sum(int count, ...){ va_list lst; va_start(lst, count); int...
View ArticleHow does work vararg function calling
I'm trying to understand how a variadic function does work. I'm read man stdarg and I'm write the following code:#include <stdarg.h>#include <stdio.h>int sum(int count, ...){ va_list lst;...
View Article