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

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.

 

 

Posted Date: 3/21/2013 7:27:44 AM | Location : United States







Related Discussions:- When do employ "const" reference arguments in function?, Assignment Help, Ask Question on When do employ "const" reference arguments in function?, Get Answer, Expert's Help, When do employ "const" reference arguments in function? Discussions

Write discussion on When do employ "const" reference arguments in function?
Your posts are moderated
Related Questions

Is always the default constructor for Fred Fred::Fred()?

Use of random function: int main(void) {    int i,j;         for(j=0;j       {      // randomize();       for(i=0;i                  printf("%d\n", ran

Create a program WordCount1Main.java doing the following:  For each word in the le word.txt { Create an object of the class Word { Add the object to a set of the type java.uti

real time application of b tree

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

Available in the string.h header file are the following routines         strcat(string1,string2);   This joins string2 to string1; care must be taken to allocate enough space for

Is it possible to create your own header files? - Yes, it's possible to create a customized header file. - To do this, you just need to include function prototypes that you

how is it made

program coding for the conversion of string to a palindrome