What will be the result of the code execution:
#include <iostream>
template <int T> 
struct X
{
        enum val {v = T * X<T-1>::v };
};

template <> 
struct X<0>
{
        enum val {v = 1 };
};

int main() { std::cout<<X<5>::v; }

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes