1.

What is the output of this program?
#include 
#include
using namespace std;
void function(std::string message, ...);
int main()
{
function("InterviewMania", 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;
}

A. InterviewMania
B. 5
C. 7
D. 8
E. Compilation Error
Answer» D. 8


Discussion

No Comment Found

Related MCQs