Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago

Question

4. How has e-commerce affected business-to-business transactions?

Answered: 1 week ago