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?

Need an indicator, Need an indicator Project Description: Need an ind...

Need an indicator Project Description: Need an indicator which indicates target and trailing sl after entering trades. Skills required are C Programming, C++ Programming,

C program to convert number to binary, Write a program in C that you will n...

Write a program in C that you will name "divide.exe", to divide one 32-bit twos-complement binary number by another, giving the quotient and the remainder, using the subtract-shift

Charity Ball Organizer, Charity Ball Organizer Many charities support good...

Charity Ball Organizer Many charities support good causes, but one of the difficulties each of them has is organizing their fundraising events. After nearly a semester of C progra

Program of conversion from basic to user-defined variable, Conversion from ...

Conversion from Basic to User-Defined variable Consider the following example. class Distance                  {                   public  :

Data structure, Project Description: Project is related indexing data re...

Project Description: Project is related indexing data related some data structure. I need to share all information related project later if i contact any body Skills required

3n+1, Consider the following algorithm to generate a sequence of numbers. S...

Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. If n is odd, multiply by 3 and add 1. Repeat this process wi

Prime no., program to find if a no . is prime or not

program to find if a no . is prime or not

Stack, write a simple c++ program to implement a stack: 1. push 2. pop

write a simple c++ program to implement a stack: 1. push 2. pop

Implement mini version of linux ''tar'', I need to implement a mini version...

I need to implement a mini version of linux''s ''tar'' function in C.

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