SHARE
TWEET

C ques 18

Dprogrammed1 Apr 5th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdarg.h>
  3. void dumplist(int, ...);
  4.  
  5. int main()
  6. {
  7.     dumplist(2, 4, 8);
  8.     dumplist(3, 6, 9, 7);
  9.     return 0;
  10. }
  11. void dumplist(int n, ...)
  12. {
  13.     va_list p; int i;
  14.     va_start(p, n);
  15.  
  16.     while(n-->0)
  17.     {
  18.         i = va_arg(p, int);
  19.         printf("%d", i);
  20.     }
  21.     va_end(p);
  22.     printf("\n");
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top