C++/C++

Advertisement


Question
What is the difference between constant reference & constant pointer.
Why two different name are there?
examples also...

Answer
Difference between refrence and pointer is refrence should always be initialized when created and it is alias for a variable. Where pointer points to a memory location and it may or may not be initialized.

In constant refrence you cannot change the value of the variable it points to where as in constant pointer you can change the value but, not the adress it points to.

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


rakshitha

Expertise

Difficult questions related to C .

Experience

C ,vc ,opc ,windows CE, ActiveX

Education/Credentials
Masters in electrical engineering

©2016 About.com. All rights reserved.