What will be the output of the following C++ code?
#include<iostream>
#include<any>
using namespace std;
int main()
{
int a = 5;
any var = a;
cout<<var<<endl;
return 0;
}
#include<iostream>
#include<any>
using namespace std;
int main()
{
int a = 5;
any var = a;
cout<<var<<endl;
return 0;
}A. 5
B. Compile-time error
C. Run-time error
D. Nothing is printed
Answer: Option B

Join The Discussion