#include<iostream.h>
#include<conio.h>
char &change(int i);
char arr[50] = "Hello World";
int main ()
{
clrscr();
change (5); // simple call
cout<<arr<<endl;
change (5) = 'X'; // using function call as an Lvalue
cout<< arr;
getch();
return 0;
}
char &change(int i)
{
return arr [i];
}