Q. What is the output of this program?
Code:#include
#include
using namespace std;
void function(std::string message, ...);
int main()
{
function("UdayMCQBuddy", 5, 7, 10, 8, 9);
return 0;
}
void function(std::string message, ...)
{
va_list ptr;
int number;
va_start(ptr, message);
number = va_arg(ptr, int);
number = va_arg(ptr, int);
cout << number;
}
β
Correct Answer: (C)
7