Write a program that defines the following strings: Char S1[100], S2[(20],S3[100]; Read the strings S1 and S2 from keyboard, initialize S3 with NULL then ask the user to choose a task from the following list: 1- Determine if S2 is a substring of S1. 2- Copy S2 to S3. 3- Determine if S2 is palindrome. 4- Count the number of vowels in S1. 5- Find the length of the string S1. 6- Display all the strings on screen. 7- Exit. Your program keeps on displaying the above list to the user and pert required task until the user enters 7. ms the Notes: 1- If S1="HelloWorld" and S2 = "World", then S2 is a substring of S1. 2- If S2="Hello", and the user chooses (2), the result is: S2="Hello", S3="Hello" 3- Palindrome means that it can be read from both ends as the same string. Example: Palindrome strings: ATTA, rar, SO, tttt The following strings are not palindrome: abab, abta, abc 4- The vowels are: a, e, o, u, i. If S1= abc, the number of vowels=D1 If S1= fcb, the number of vowels=0 If S1=Hello, the number of vowels=2
Write a program that defines the following strings: Char S1[100], S2[(20],S3[100]; Read the strings S1 and S2 from keyboard, initialize S3 with NULL then ask the user to choose a task from the following list: 1- Determine if S2 is a substring of S1. 2- Copy S2 to S3. 3- Determine if S2 is palindrome. 4- Count the number of vowels in S1. 5- Find the length of the string S1. 6- Display all the strings on screen. 7- Exit. Your program keeps on displaying the above list to the user and pert required task until the user enters 7. ms the Notes: 1- If S1="HelloWorld" and S2 = "World", then S2 is a substring of S1. 2- If S2="Hello", and the user chooses (2), the result is: S2="Hello", S3="Hello" 3- Palindrome means that it can be read from both ends as the same string. Example: Palindrome strings: ATTA, rar, SO, tttt The following strings are not palindrome: abab, abta, abc 4- The vowels are: a, e, o, u, i. If S1= abc, the number of vowels=D1 If S1= fcb, the number of vowels=0 If S1=Hello, the number of vowels=2
Chapter8: Arrays
Section: Chapter Questions
Problem 5PE
Related questions
Question
c++ language, please solve the question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT