What will print to the screen the following program?
#include <iostream>
static int a = 0;

template<typename T>
void f(T t)
{
    static int b = ++a;
    std::cout << a;
    std::cout << b++;
}

int main (int argc, char *argv[])
{
    f(27);
    f(634);
    f(.8);
    return 0;
}

Follow CodeGalaxy

Mobile Beta

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