Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » Homework HelpRSS Feeds

FUNCTION WITH ALIAS NAME OR REFERENCE VARIABLE IN C++

Posted By: Toby Evans     Category: C++ Programming     Views: 3384

FUNCTION WITH ALIAS NAME OR REFERENCE VARIABLE IN C++.

Code for FUNCTION WITH ALIAS NAME OR REFERENCE VARIABLE IN C++ in C++ Programming

# include <iostream.h>
# include <conio.h>

int main()
{
    clrscr();
    int i,j;
    void change(int &,int &);
    cout<<"\nENTER THE VALUE FOR THE FIRST VARIABLE:->";
    cin>>i;
    cout<<"\nENTER THE VALUE FOR THE SECOND VARIABLE:->";
    cin>>j;
    change(i,j);
    cout<<"\nTHE CHANGED FIRST VALUE IS :->"<<i;
    cout<<"\nTHE CHANGED SECOND VALUE IS :->"<<j;
    getch();
    return 0;
}

void change(int &i,int &j)
{
    i=i+10;
    j=j+10;
}
  
Share: 


Didn't find what you were looking for? Find more on FUNCTION WITH ALIAS NAME OR REFERENCE VARIABLE IN C++ Or get search suggestion and latest updates.

Toby Evans
Toby Evans author of FUNCTION WITH ALIAS NAME OR REFERENCE VARIABLE IN C++ is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!