Q116
What will be the output of the following C++ code? #include #include using namespace std; void fun(std::string msg, ...); int main() fun("cPlusPlus", 1, 4, 7, 11, 0); return 0; void fun(std::string msg, ...) va_list ptr; int num; va_start(ptr, msg); num = va_arg(ptr, int); num = va_arg(ptr, int); cout << num;
A.
6
B.
5
C.
8
D.
4
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board