How to create a reference variable in C++



How to create a reference variable in C++..

Answer / 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

More C++ General Interview Questions

What do you mean by vtable and vptr in c++?

0 Answers  


Explain the extern storage classes in c++.

0 Answers  


List the types of polymorphism in c++?

0 Answers  


Write a program that read 2o numbers in and array and output the second largest number. Can anybody help??

7 Answers  


Difference between Operator overloading and Functional overloading?

10 Answers   HP,






How do you declare A pointer to function which receives an int pointer and returns a float pointer

0 Answers  


If I is an integer variable, which is faster ++i or i++?

0 Answers  


differance between copy & clon

1 Answers   Microsoft,


Explain deep copy and a shallow copy?

0 Answers  


What is name hiding in c++?

0 Answers  


How can we access protected and private members of a class?

0 Answers  


What is the disadvantage of using a macro?

0 Answers  


Categories