Computer Science, asked by AdityaSingh987654321, 1 year ago

What is a reference data type ???

Answers

Answered by riyanayak143
4
A reference type is a data type that refers to an object in memory....

hope it helps you!!
Answered by siddhartharao77
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....
Anonymous: ^_^
siddhartharao77: Welcome sis!
Similar questions