In my question paper there was a question to find output of the following program
On compiling it on my pc i am getting strange error l value reqd.Can anyone tell me why i am getting it. I also request you to compile it on your compiler as i am using old turbo c++.Code:#include<iostream.h>
#include<conio.h>
int main()
{
int ia[3]={2,5,9};
int *ptr=ia;
for(int i=0;i<3;i++)
{
cout<<*(ia++);//Error Lvalue reqd.
cout<<" "<<*ptr++;
}
getch();
return(0);
}