Question: In C++, Write a program that will input three c-strings into an array of c-strings. Print only those that end in es or begin in
In C++, Write a program that will input three c-strings into an array of c-strings. Print only those that end in "es" or begin in "yan". Use the following: char cstr[3][30]; Use for loops to fill up the array and to loop through the c-strings for the searches. The input c-stirings could include spaces and multiple words. You will search two different ways. First, use a c-string function to find the length so you know where the last two characters are, then compare the last two characters separately as an array. Second, use a c-string function to compare, all at once, just the first three characters in the c-string (a function similar to strcmp, but that will only compare a certain number of characters).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
