Question: C programming problem. Sample output shown LAB 9 HOMEWORK ASSIGNMENT to be turned in In this assignment, you will work with strings and hence character

C programming problem. Sample output shown

C programming problem. Sample output shown LAB 9 HOMEWORK ASSIGNMENT to beturned in In this assignment, you will work with strings and hencecharacter arrays), and will manipulate them using pointers as well functions from

LAB 9 HOMEWORK ASSIGNMENT to be turned in In this assignment, you will work with strings and hence character arrays), and will manipulate them using pointers as well functions from the standard string library (string.h). Specifically, your task is to write a program that does all of the following: 1. Reads two strings from the user 2. Compares the lengths of the strings and determines which is the longer one, i.e. contains more characters. For example, "Hello there is longer than "Hello 3. Determines whether the shorter string is a prefix of the longer string. For example, "He is a prefix of "Hello there!". 4. Determines whether the shorter string is a suffix (or postfix) of the longer string. For example, "here" is a suffix of "Hello there" 5. Determines the number of times that the shorter string occurs in the longer string. For example, string "bra" occurs 2 times in string "abracadabraa". 6. Counts the number of words in the longer string. In this assignment, we assume a word is any sequence of characters that does not contain any white space characters (i.e. space, tab, or newline). IMPORTANTGUIDELINES 1) The user will be prompted to enter each string on a separate line and might contain spaces. Therefore you may not be able to use scanf and you will need to instead use gets (or fgets to read them

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!