--- In [email protected], "muhammad shahid" <[EMAIL PROTECTED]> wrote: > > HELLO TO ALL > FRIENDS I AM A NEW PROGRAMMER IN C++, STUDENT OF > ELECTRONICS AND TELECOM ENGG. > MY problem(in the following program) is that i > want to store the values of 1starray(int 1starray[15]) into the > 2ndarray(2ndarray[15]) in the reverse order > i.e., the value at " 1starray[0]" will be equal to at "2ndarray[15]" in > other words values at reverse index of array. > i am using turbo c 3.0. > > > #include<iostream.h> > #include<conio.h> > void main() > { > clrscr(); > int 1starray[15]; > int 2ndarray[15]; > cout<<""Enter values?\n"; > for(int i=0;i<15;i++) > { > cin>>1starray[i]; > } > HOW I DO NEXT \ > > > > PLZ REPLY > SHAHID SHARIF > list: int j=15; for(i=0;i<15;i++) { 2ndarray[j]=1starray[i];//copy value of 1star to 2ndar j--;//increment j }
note: the value of 2ndarray[0]=0; cause value of 1starray[15]=0;
