0

Please I need help to output the names that end with letter character 'y'' I've tried manipulating the for loop, but no output

https://code.sololearn.com/csU4E9cj35uh/?ref=app

19th Jul 2020, 4:02 PM
Femi SONI Y
Femi SONI Y - avatar
4 Réponses
+ 1
change the if condition to this: strlen() will find the length of the string and subtract 1 from it to get the last index of the string if( nm[i][ strlen( nm[i] ) - 1 ] == ch) {
19th Jul 2020, 4:09 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Here is your fixed code https://code.sololearn.com/c2Z8Wx1IiZXm/?ref=app Simply add another for loop for iteration 2d array
19th Jul 2020, 4:14 PM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar
+ 1
AZHAGESAN S thanks am grateful.
19th Jul 2020, 7:23 PM
Femi SONI Y
Femi SONI Y - avatar
0
Sami Khan thanks alot I seen my error, I just have learn more on how to express conditionals with string functions
19th Jul 2020, 7:10 PM
Femi SONI Y
Femi SONI Y - avatar