Question: C PROGRAMMING Implement a function that copies a string by reversing its characters and converting all upper case letters to lower case. This function reverses
C PROGRAMMING
Implement a function that copies a string by reversing its characters and converting all upper case letters to lower case.
This function reverses its first nullterminated string argument str into the string copy while converting all upper case characters to lower case characters. For example, if
str "HeLLo"
After calling the function, copy would be
copy "olleh"
The function should make copy a valid C string by properly terminating it with null termination character.
Hint
stdlib provides useful character handling functions in ctype.h
Important
copy can be assumed to have enough space for copying the str You do not need to allocate memory for it
Template USE THIS:
void copyreversedaslowerconst char str char copy
TODO: Implement your function here!
details You are strongly encouraged to test your implementation
using this function. Try to create at least three test cases to check
whether your function implementation is correct.
void mytestsvoid
You can write your own test code here.
int mainvoid
You may implement your own tests in mytests function
mytests;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
