i made this code to print out vowels from array. i have wrote code before but back then only error was that it was printing whole array instead of just vowels. i wrote it today again i dont think that 2nd time i have made any change in code than the previous one(if i made i cant see) but now it takes blank input of array and ends the program. can u help me out? here is the code:
int size=0;
cout<<"Enter the size of array=";
cin>>size;
char arr[size];
cout<<"Enter the array=";
for(int i=0;arr[i]='\0';i++){
cin>>arr[i];
}
for(int i=0;arr[i]!='\0';i++)
{
if(arr[i]=='a'||'e'||'i'||'o'||'u'||'A'||'E'||'I'||'O'||'U')
{
cout<<arr[i];
}
}