#include<iostream>

using namespace std;



int main(void)

{

     int a=10 ,b=4;

       int& c=a;



       cout<<"\n-"<<a;

       a+=20;

       cout<<"\n-"<<c;

       /********************/

       //Add your code here.





       /*********************/





       cout<<"\n-"<<c;

                  c=999;

       cout<<"\n-"<<b;





       cin.get();

      return 0;

}





In this code , c is a reference to a.

Task : Make c to refer towards b.



P.S: You are only allowed to add your code , within the given area. No other
 thing could  be modified. You can’t allocate any extra space too.



Present O/P:

10

30

30

4



O/P after adding your code should be:

10

30

4

999

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to