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
Project Description: We are seeking someone to search mp3 link form audio or m3u8 for videos. Skills required are .NET, C Programming, Engineering, C# Programming

source code for padovan string


C Program for FUNCTION OF COPY ONE STRING IN OTHER STRING #include stdio.h> #include conio.h> int copy(char a[],char b[]); void main() {           char a[100],b[

I Want a answer for solving the big M method in the topic of simplex method...

#I have assignment c with unix thread multiplication program ..

Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect

b) The static keyword let a variable to maintain its value among distinct function calls. If the value of a static variable alters while the variable has been accessed, variable

By pressing ‘6’ (i.e. key’6’ one time) on the keypad, the mobile shows ‘m’ on display screen in write text message area .

C program to print R diagonal triangle: #define rows 3 #define cols 3 void main() {                 int i=0,j=0;                 int arr[rows][cols];