#include <iostream> using namespace std; int print_all (int num, ...) { int sum = 0; va_list args; va_start (args,num); for (int i = 0; i < num; i++) { int num = va_arg (args,int); cout<<num<<" "; } va_end (args); return sum; } int main (void) { print_all(8, 1, 2, -1, 4, 12, -2, 9, 7); return 0; }
a) stdlib.h
b) stdarg.h
c) string.h
d) stdpar.h
Which of the header file should be added in the following C++ code to properly run the program?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Which of the header file should be added in the following C++ code to properly run the program?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!