Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> using namespace std; template <typename T> void fun(const T&x) { static int count = 0; cout << "x = " << x << " count = " << count; ++count; return; } int main() { fun<int> (1); cout << endl; fun<int>(1); cout << endl; fun<double>(1.1); cout << endl; return 0; }

Select the correct option to test your answer:

More Computer Questions

Avro schemas describe the format of the message and are defined using . . . . . . . . What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int var = -12; try { cout<<"Inside try\n"; if (var < 0) { throw var; cout<<"After throw\n"; } } catch (char var ) { cout<<"Exception Caught\n"; } cout<<"After catch\n"; return 0; } What is the primary use of "word embeddings" in NLP? What does the built-in function chr() do in Python? What will be the output of the following code: cout << (5 == 5.0); in C++?