Question: in c++ Write a function called shortestLen, which takes an array of string with the array capacity and returns the length of the shortest string

in c++ Write a function called shortestLen, which takes an array of string with the array capacity and returns the length of the shortest string in the array. Write a function called triangle that takes the size of the triangle as its parameter, prints a triangle with alphabets like following. The first line starts with A, second line starts with B, third line starts with C, and so on. Write a function called isPalindrome that takes a string and return true if the string parameter is palindrome ignore case, false otherwise. A palindrome spell the same forwards and backwards. Ex: dad, racecar, noon. Test with the following main function int main(){ string x[5] = {"This", "is", "one", "example", "!!"}; int shortest_length = shortestLen(x, 5); for (int i = 0; i < 5; i++) if (x[i].size() == shortest_length) cout << x[i] << endl; //prints:is !! triangle(5); /*The above function prints following: A BC CDE DEFG EFGHI */ string word[6] = {"Dad", "noon", "raceCar", "Mon", "Greg", "A"}; for (int i = 0; i < 6; i++) cout << isPalindrome(word[i]); //prints: 111001 cout << endl; return 0; } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!