Write a C++ Program for Reference Variable.


SUBMITTED BY: Nrupeshsinh

DATE: June 22, 2016, 11:59 a.m.

FORMAT: Text only

SIZE: 209 Bytes

HITS: 669

  1. # include<iostream.h>
  2. # include<conio.h>
  3. void change(int &a)
  4. {
  5. int b=2;
  6. a+=b;
  7. }
  8. void main()
  9. {
  10. clrscr();
  11. int n=5;
  12. cout<<"Value is ="<<n<<endl;
  13. change(n);
  14. cout<<"Value is ="<<n;
  15. getch();
  16. }

comments powered by Disqus