Home / MCQ Bank / Computer
Computer Functions And Procedures In C Plus Plus Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> #include <stdarg.h> using namespace std; void dumplist(int, ...); int main() { dumplist(2, 4, 8); dumplist(3, 6, 9, 7); return 0; } void dumplist(int n, ...) { va_list p; int i; va_start(p, n); while (n-->0) { i = va_arg(p, int); cout << i; } va_end(p); }

Select the correct option to test your answer:

More Computer Questions

What are the components of a marker interface? What will be the output of the following C# code? static void Main(string[] args) { int i = -10; for ( ;Convert.ToBoolean(Convert.ToInt32(i)) ;Console.WriteLine(i++)) ; Console.ReadLine(); } Which of the following can be used to create a directory? Which of these method returns the remainder of dividend / divisor? What is the primary function of "Power BI" in data science?