What will be the output of the following C++ code? [code] #include<iostream> #include<any> #include<string> using namespace std; int main() { s

Đăng Khánh

New member
What will be the output of the following C++ code?
Code:
#include<iostream>
#include<any>
#include<string>
using namespace std;
int main()
{
	string s = "Hello World";
	any var(s);
	cout<<any_cast<string>(var)<<endl;
	return 0;
}
A. Run-time error
B. Compile-time error
C. Hello World
D. Nothing is printed
 

Tìm kiếm

Back
Top