How to create a reference variable in C++

Answer Posted / hrpynux@gmail.com

When a variable is declared as a reference, it becomes an alternative name for an existing variable. A variable can be declared as a reference by putting '&' in the declaration.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which bit wise operator is suitable for checking whether a particular bit is on or off?

799


Why c++ does not have finally?

824


Difference between a homogeneous and a heterogeneous container

902


What is malloc in c++?

734


What is vector string in c++?

804


What is public, protected, private in c++?

872


Is there structure in c++?

774


Do you need a main function in c++?

819


What is stream and its types in c++?

766


What is endl?

887


Write about the retrieval of n number of objects during the process of delete[]p?

779


Explain overriding.

769


How much do coding jobs pay?

757


What is c++ virtual inheritance?

818


Can a constructor return a value?

880