Simple String Template

1

How many parameters are legal for non-type template?

A. 1
B. 2
C. 3
D. 4

2

What may be the name of the parameter that the template should take?

A. same as template
B. same as class
C. same as function
D. none of the mentioned

3

Which are done by compiler for templates?

A. type-safe
B. portability
C. code elimination
D. all of the mentioned

4

How many types of templates are there in c++?

A. 1
B. 2
C. 3
D. 4

5

What is the output of this program?

1.
    #include 
2.
    #include 
3.
    using namespace std;
4.
    template
5.
    void print_mydata(T output)
6.
    {
7.
        cout << output << endl;
8.
    }
9.
    int main()
10.
    {
11.
        double d = 5.5;
12.
        string s("Hello World");
13.
        print_mydata( d );
14.
        print_mydata( s );
15.
        return 0;
16.
    }

a) 5.5

Hello World

b) 5.5

c) Hello World

d) none of the mentioned