Question: Write and run a C program that performs the following: o Create two arrays of character each of size 100 o prompts the user to

Write and run a C program that performs the following:

o Create two arrays of character each of size 100

o prompts the user to enter 2 strings and store them in the two-character arrays

o Passes the second string to a recursive user defined function named recusive_upper__case_count that takes an input parameter of type char* (null-terminated C strings of characters). The size of the input string is not passed as parameter.The function should return number of the upper case characters in the string.

o Print the number of upper-case character (from inside the main)

o Write a C function named IsPrefix that takes two input parameters SmallS and BigS of type char* (null-terminated C strings of characters) and determines if SmallS is a prefix a is SmallS If). BigS of prefix of BigS, the function returns 1; otherwise, it returns 0. The sizes of the input strings are not passed as parameters. Assume that SmallS is guaranteed to be shorter than BigS. For example, if BigS is Cprogrammingisgood and SmallS is Cprog or Cpr, the function should return 1, while if SmallS is Clang or programming or good, the function should return 0.

o In the main function, pass any two string to the function IsPrefix such that the first string is smaller than the second one, and print the result return by the function

Sample run

Enter the First String (without spaces)

C_Prog

Enter the Second String (without spaces)

C_Programming_is_good

The number of upper-case characters in the string C_Programming_is_good is 2

The string C_Prog is a prefex of the string C_Programming_is_good

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!