LogiQuest
Back to Templates
8

What will be the output of the program?

#include <iostream>
using namespace std;
template <typename T, typename U>
struct Pair { T a; U b; };
int main() {
    Pair<int, char> p{65, 'B'};
    cout << p.a << p.b << endl;
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.