Please help me with the code as below. It gives me an error. I am unable to rectify it.
Code:#include <iostream.h> void main () { int size, i; cout<<"Enter the array length:"; cin>>size; cout<<endl; char* arr[size]; cout<<"Enter the array items:"<<endl; for (i=1;i<=size;i++) { cout<<i<<"."; cin>>arr[i]; } cout<<endl<<"The array items:"<<endl; for(i=1;i<=size;i++) { cout<<i<<"."; cout<<arr[i]<<endl; } }
Bookmarks