We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Functions
- Variadic functions in C
- Discussions
Variadic functions in C
Variadic functions in C
Sort by
recency
|
134 Discussions
|
Please Login in order to post a comment
int sum (int count,...) { int sum = 0; va_list ptr; va_start(ptr, count); for(int i=0; i
int min(int count,...) {
va_list ptr;
va_start(ptr,count);
int min = va_arg(ptr,int);
for(int i=0; i
} va_end(ptr);
return(min); }
int max(int count,...) { va_list ptr;
va_start(ptr,count);
int max = va_arg(ptr,int);
for(int i=0; i max){ max = next; } }
return(max); }
can anyone expalin the output