1.

What Are The Advantages Of Using Const Reference Arguments In A Function?

Answer»

The following are the advantages of USING the const reference arguments in a function:
a. Protects against errors that result in altering DATA of a program.
b. Allows the processing of const and non-const actual arguments by the function. On the contrary, in the prototype, the acceptance of only non-constant arguments is done by the function without a const.
c. Allows the GENERATION and usage of a TEMPORARY variable by the function APPROPRIATELY.

The following are the advantages of using the const reference arguments in a function:
a. Protects against errors that result in altering data of a program.
b. Allows the processing of const and non-const actual arguments by the function. On the contrary, in the prototype, the acceptance of only non-constant arguments is done by the function without a const.
c. Allows the generation and usage of a temporary variable by the function appropriately.



Discussion

No Comment Found