What is a reference data type ???
Answers
Answered by
4
A reference type is a data type that refers to an object in memory....
hope it helps you!!
hope it helps you!!
Answered by
3
Short note on reference data type:
= > It is a derived data type.
= > It was introduced in c++.
= > It is declared using & operator.
= > It doesn't take any space in memory.
= > A reference must be initialized when it is created.
Ex:
#include<iostream.h>
void main()
{
int a = 10;
int &b = a; ------- Here, b is referencing a.
cout << a << endl;
cout << b << endl;
output:
10
10
Hope it helps!
Anonymous:
Thanks for the answer bhaiyya... i was indeed of this....
Similar questions