The correct answer is: C. either (a) or (b)
In the statement template
A class is a user-defined data type that can be used to create objects. A scalar variable is a variable that can store a single value.
For example, the following code defines a template function that can be used to print the value of any type of variable:
c++
template <class T>
void print(T value) {
std::cout << value << std::endl;
}
The following code calls the print function to print the value of an integer variable, a floating-point variable, and a string variable:
“`c++
int x = 10;
float y = 3.14;
std::string z = “Hello, world!”;
print(x);
print(y);
print(z);
“`
The output of the code is:
10
3.14
Hello, world!