CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C++ Quiz #56

Two-Type Template Class Output

mediumTemplates

What is the output of this code? ``cpp #include <iostream> #include <string> using namespace std; template <typename K, typename V> class Entry { public: K key; V value; Entry(K k, V v) : key(k), value(v) {} void print() { cout << key << ": " << value << "\n"; } }; int main() { Entry<string, int> e("score", 100); e.print(); } ``