fork(1) download
  1. void func_int(int count, int param, ...) {
  2. int *argptr = &param;
  3. int i;
  4. for (i = 0; i < count; i++, argptr++) {
  5. printf("%d\n", *argptr);
  6. }
  7. }
  8.  
  9. void func_double(int count, double param, ...) {
  10. double *argptr = &param;
  11. int i;
  12. for (i = 0; i < count; i++, argptr++) {
  13. printf("%lf\n", *argptr);
  14. }
  15. }
  16.  
  17. int main() {
  18. func_int(4, 0, 1, 2, 3);
  19. func_double(4, .0, .1, .2, .3);
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
0
1
2
3
0.000000
0.000000
0.000000
0.000000