What will be the output of the following C++ code?
#include <iostream>
#include <stdarg.h>
using namespace std;
int flue(char c,...);
int main()
{
int x, y;
x = flue('A', 1, 2, 3);
y = flue('1', 1.0,1, '1', 1.0f, 1l);
cout << x << y;
return 0;
}
int flue(char c,...)
{
return c;
}
#include <iostream>
#include <stdarg.h>
using namespace std;
int flue(char c,...);
int main()
{
int x, y;
x = flue('A', 1, 2, 3);
y = flue('1', 1.0,1, '1', 1.0f, 1l);
cout << x << y;
return 0;
}
int flue(char c,...)
{
return c;
}A. 6549
B. 4965
C. 6646
D. compile time error
Answer: Option A

Join The Discussion