tasarazamamena2233
tasarazamamena2233 tasarazamamena2233
  • 05-07-2021
  • Computers and Technology
contestada

How can I pass the variable argument list passed to one function to another function.

Respuesta :

sk5634943
sk5634943 sk5634943
  • 05-07-2021

Answer:

Explanation:

#include <stdarg.h>  

main()  

{  

display("Hello", 4, 12, 13, 14, 44);  

}  

display(char *s,...)  

{  

va_list ptr;  

va_start(ptr, s);  

show(s,ptr);  

}  

show(char *t, va_list ptr1)  

{  

int a, n, i;  

a=va_arg(ptr1, int);  

for(i=0; i<a; i++)  

 {  

n=va_arg(ptr1, int);  

printf("\n%d", n);  

}  

}

Answer Link

Otras preguntas

What development during the 1840s caused a sharp increase in immigration to America?
Eating meals will help you to establish healthy eating habits. Large, Regular, or irregular?
In the late 1700s, the passage of the Northwest Ordinance allowed for the
the hellenistic culture associated with the rule of alexander the great developed as a result of
What type of government did vietnam have before the war?
Given the formula PV = nRT , solve for the variable T
Land plants developed stomata to help with
if you're solving for volume using pi r2h how for you solve for height using the same values?
What are two things that Douglas warns will happen if Lincoln is elected?
Were Americans right to be afraid? Think about what you have just learned, then use the checkboxes to express your point of view. Select every statement below t