Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
write programme in c code Exercise 2 - String operations using recursive functions (4 marks) Exercise Objectives Identifying the base case(s) and recursive step used
write programme in c code
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. o Strength(), a recursive function that receives a string, and returns its length o LowercaseNum(), this recursive function receives a string and returns the number of lowercase letters in the string o ConvertToUpperrcasel), this recursive function converts all characters to upercase StrReverse(), a recursive function that receives a string and reverse the string 0 In the main function: o Prompt the user to input myhobby o Print myhobby characters by calling PrintStrChars() function Call Strength() for myhobby and display the length Call UppercaseNum() for myhobby, and display the result Call ConvertToLowercase() for myhobby, then print myhobby o Call StrReverse() for myname, then print myhobby. [Hinta: you need to call StrLength() 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] Organize the output to appear as shown in the sample output below Download your project as .zip file and keep it within your file system (Desktop for example) Upload the project to the eLearning platform Sample Output Input your hobby BasketBALL Page 3 of 5 Printing myhobby character by character B a S t B A The length of myhobby = 10 Number of Lowercase character = 5 Converting myhobby to uppercase BASKETBALL Reversing myhobby becomes: HabteksabStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started