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
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0

What is Namespace and Explicit container Namespace - Namespaces are used to group entities such as objects, classes and functions under a name. Explicit container.

Overall Program Objective: You will design and simulate a basic RISC processor.   You will create and encode an instruction set.  Your final task will be to "compile" a program


Structures A structure is a user-defined data type, which may have different data types as its members. Creating a structure is a two-part process. First, a structure template

Explain about the Variables in c language? The Variable is an identifier that is used to represent some specified kind of information within a designated portion of the program


create a program to populate the first array then the odd number is the second array and get the sum of the second array.

Aim: Write a program of multipication using inline function class Multiply {           int x,y;           public:           void getdata();           inline calc

Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid