When do employ "const" reference arguments in function?, C/C++ Programming

Assignment Help:

A:

1.      By using const protects you against programming errors which inadvertently alter data.

2.      By using const allows function to procedure const and non-const actual both arguments, whereas a function without const in the prototype can only accept non constant arguments.

3.      By using a const reference let the function to generate and employ a temporary variable appropriately.

 

 


Related Discussions:- When do employ "const" reference arguments in function?

Doubt!, find the greater of the two variables, without using conditional lo...

find the greater of the two variables, without using conditional loops or ternary operators?

Define advantages of multi file program, Define Advantages of Multi File Pr...

Define Advantages of Multi File Program? The main merits of spreading a program across several files are: • Teams of programmers able to work on programs. Every programmer w

Programming, I have a C++ programming assignment due on 8th January. As I a...

I have a C++ programming assignment due on 8th January. As I am out of country and cannot complete it, I would like to know how much fees would you charge to complete the assignmen

Explain friend for overloading operators, Friend for Overloading Operators ...

Friend for Overloading Operators Sometimes friend functions cannot be avoided. For example with the operator overloading. Consider the following class that have data members to

Explain the defination and declaration of union, Explain the Defination and...

Explain the Defination and Declaration of Union? Generally in terms the composition of a union may be defined as be as union tag { member 1; member 2; member m; }; Wh

#pointers, what is the purpose of pointer ? what is the syntax? how it work...

what is the purpose of pointer ? what is the syntax? how it works?

Singly linked list, For this program you will add and test 2 new member fun...

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

Array, Assigning value to individual elements in array

Assigning value to individual elements in array

C++, Write a program to find the area under the curve y = f(x) between x = ...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd