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
Padovan String Problem Description A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes s

P o i n t e r d e c l a r a t i o n f o r me m b e r f un c t i o n : M e t h o d 1 : W h e n C l a ss i s n o t

types of lists

in this problem u given a board in which some of the elements are placed as shown in diagram below .each element represent a color .fill the other elements in the board such that n


Explain about the Floating point Constants in c language? A floating point constant is the number that contains either a fraction or decimal part. If an exponent is present its

draw the flow chart to print the fibonacci series upto n th terms

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed

Write a program to calculate the average of ten numbers       #include stdio.h     /* Only this header is needed since only IO are used */     void main()     {          char

program of area under integration