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

1. Templates can make available to the programmer the generality of algorithms that implementation with specific types conceals.

2. With regard to programming usage, consistency in coding is more important than optimality.


1. True
Explanation: In many functions, the algorithm that is implemented is more general than the implementation. Templates provide, in effect, an overloading of the function for every possible type that is consistent with the use in the template. For example, if you assign template parameter objects, this must make sense for the type.
2. True
Explanation: If one is inconsistent with many details in coding, the reader will make more errors than would happen otherwise.

Computer Science & Information Technology

You might also like to view...

What is an Application menu? What does it allow you to do?

What will be an ideal response?

Computer Science & Information Technology

Why might you want to write a program in a machine-independent language instead of a machine-dependent language? Why might a machine-dependent language be more appropriate for writing certain types of programs?

What will be an ideal response?

Computer Science & Information Technology

The First Line Indent marker is located on the status bar

Indicate whether the statement is true or false

Computer Science & Information Technology

At what layer of the OSI model does a network switch normally operate?

a. Layer 2 b. Layer 3 c. Layer 4 d. Layer 5

Computer Science & Information Technology