CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

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

Topics

Template with Two Type Arguments

C++ quiz · Question 57
mediumTemplates

What is the output of the following program?

#include <iostream>
#include <string>
using namespace std;

template <typename A, typename B>
void describe(A first, B second) {
    cout << "First: " << first << ", Second: " << second << "\n";
}

int main() {
    describe(42, string("hello"));
    describe(3.14, true);
}