Question: Programming Assignment #4 Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert

 Programming Assignment #4 Write a C program that prompts the user
to enter a line of text (up to 50 characters). It should

Programming Assignment #4 Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert the text entered to uppercase letters and then to lowercase letters. Your program should use a character array: text(51] to store text. It should use function safer_gets0 to prompt the user for the line of text. Your program must use pointer notation and pointer math fi.e no array index The dialog with the user must look like: Enter a line of text (up to 50 characters) ThiS is A LiNe of teXt with UPPER and lower CaSe charactERS The line of text in uppercase is: THIS IS A LINE OF TEXT WITH UPPER AND LOWER C The line of text in lowercase is: this is a line of text with upper and lower case c Note: The blue text represents the "output" from your program and is shown for clarity only here. It is not required that your output be in this color. (Do not even attempt to tryl). Also note that what the user types in is indicated by the bolded black text above. Again, for clarity only. (Notice that text is truncated once the 50 character limit has been reached - this would be handled in function safer_gets). Hints Your program requires 2 loops (either for or while). One to convert and display the string in uppercase letters, and the other to convert and display the string in lowercase letters Your program should use the C standard library functions toupper in one of the loops, and tolower in the other loop, to convert the string. Both of these functions are found in the header file ctype.h. You do not need to convert function safer gets0 to pointer notation. . Reall int: You can click on the "Assig 4 Hint" link which provides a solution to the program using array notation. You can use it as a guide if you so choose Note: An arrow symbol(>) at the beginning of a particular line of code indicates that the line of code needs to be modified for pointer notation. Good luck

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!