Checking for each vowel by traversing the concatenated string
for ( int k = 0 ; k < res . length ( ) ; k ++ ) { if ( res [ k ] == ' a ' ) vowel [ 0 ] = 1 ; else if ( res [ k ] == ' e ' ) vowel [ 1 ] = 1 ; else if ( res [ k ] == ' i ' ) vowel [ 2 ] = 1 ; else if ( res [ k ] == ' o ' ) vowel [ 3 ] = 1 ; else if ( res [ k ] == ' u ' ) vowel [ 4 ] = 1 ; }