Answer the following questions true (T) or false (F)

1. To instantiate and call, a template function requires special syntax.

2. The template prefix can be written template or template with the same results.


1. False
Explanation: If the function template is available in the file, it is only necessary to write the function name with arguments, that is, to act as if the needed function definition is already present. The compiler will figure out the types and generate the instance of the function template.
2. True
Explanation: The C++ Standard provides for use of either class or typename in here, but the text, recognizing common usage, has standardized on the use of the keyword class. Nevertheless, you may see this in code you read, so you should be able to recognize it.

Computer Science & Information Technology

You might also like to view...

The ____________ structure is built into Java; by default, statements execute in the order they appear

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which function is considered to be an advanced firewall feature?

A. Providing entry and exit points such as TCP port 80 for Web page content B. Allowing information that meets specified security criteria (such as an approved IP address) to pass C. Logging of unauthorized accesses both into and out of a network D. Providing a VPN link to another network

Computer Science & Information Technology

The Notes pane contains additional notes for the audience to read

Indicate whether the statement is true or false

Computer Science & Information Technology

What attribute determines how many choices will display at one time in a drop-down list?

A) size B) list C) length D) value

Computer Science & Information Technology