Question: C Language - Programming Exercise 2 - String operations using recursive functions (4 marks) Exercise Objectives Identifying the base case(s) and recursive step used for

C Language - Programming
C Language - Programming Exercise 2 - String operations using recursive functions

Exercise 2 - String operations using recursive functions (4 marks) Exercise Objectives Identifying the base case(s) and recursive step used for processing arrays recursively Implementing and calling recursive function that receives strings as parameters Implementing string operations within recursive functions definitions Calling functions Problem Description Within replit.com IDE, create another new repl (project) and name it "Lab10Ex2". Use this project to write and run a C program that performs the following: > Use the symbolic constant to define the size of a string (1D array of char) of 50 Declare a variables named: myhobby of the specified size Prompt the user to read myhobby array Declare the following functions as prototype and implement them after the main function (NEVER USE string.h functions): O PrintStrChars(), a recursive function receives a string and displays its characters. StrLength(), a recursive function that receives a string, and returns its length o UppercaseNum(), this recursive function receives a string and returns the number of uppercase letters in the string o ConvertToLowercase(), this recursive function converts all characters to lowercase StrReverse(), a recursive function that receives a string and reverse the string In the main function: o Prompt the user to input myhobby O Print myhobby characters by calling PrintStrChars() function o Call StrLength() for myhobby and display the length Call UppercaseNum() for myhobby, and display the result Call ConvertToLowercase() for myhobby, then print myhobby o Call StrReversel) for myname, then print myhobby. (Hint1: you need to call Strength() function to determine the end of the string] [Hint2: you can use static variables to move forward in the start of the string and to move backward in the end of the string]

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!