please do this with C language .. PLEASE _________________________ 1. Your progr
ID: 3655927 • Letter: P
Question
please do this with C language .. PLEASE _________________________ 1. Your program must have the following arrays of characters: char str[100]; char strUpper[100]; char strLower[100]; char strSwitch[100]; char strXSpace[100]; char strNoSpace[100]; char strReverse[100]; The array of character str will be used to store the string that user enters. The rest of the arrays of characters will be explained later. ________________________ 2. First your program will ask user to enter a string with the maximum of 25 characters using the following message: Please enter a string (25 characters max): To accommodate a string containing spaces, use the following scanf format: scanf(" %[^ ]s", &str;); Note that there is a space in between the rst quotation mark and the percent symbol (%). If user enter a string containing more that 25 characters, your program will show the message states that it has too many characters and ask user to enter the string again as follows: The string you just entered has too many characters. Please try again. Please enter a string (25 characters max): Note that a user may enter too many characters more than one time. Thus, your program must keep asking user to enter a string until the string user entered has less than or equal 25 characters. Note that letters (a to z and A to Z), digits (0 to 9), space, and all kind of symbols are considered to be characters. Suppose user enters I got $88 now. This string will be stored in the variable named str. ________________________ 3. Write a code fragment such that the array of characters named strUpper is the result of converting all lowercase letters (a to z) in the string str to uppercase letters. Thus strUpper should be I GOT $88 NOW. ________________________ 4. Write a code fragment such that the array of characters named strLower is the result of converting all uppercase letters (A to Z) in the string str to lowercase letters. Thus strLower should be i got $88 now. ________________________ 5. Write a code fragment such that the array of characters named strSwitch is the result of converting all lowercase letters in the string str to uppercase letters and all uppercase letters in the string str to lowercase letters. Thus strSwitch should be i GOT $88 NOW. ________________________ 6. Write a code fragment such that the array of characters named strXSpace is the result of inserting a space in between every characters (including space) of the string str. Thus strXSpace should be I g o t $ 8 8 n o w. ________________________ 7. Write a code fragment such that the array of characters named strNoSpace is the result of removing all spaces from the string str. Thus strNoSpace should be Igot$88now. ________________________ 8. Write a code fragment such that the array of characters named strReverse is the result of moving the last character of the string str to be the rst character and moving the second to last character to be the second character, and so on. Thus strReverse should be .won 8 8$ tog I ________________________ 9. Display all strings using the following code fragment: printf("Original %s ", str); printf("Uppercase : %s ", strUpper); printf("Lowercase : %s ", strLower); printf("Switched Cases : %s ", strSwitch); printf("More Spaces : %s ", strXSpace); printf("Without Spaces : %s ", strNoSpace); printf("Reversed: %s ", strReverse); ________________________ The output should look like this : Please enter a string (25 characters max): I got $88 dollars. Original : I got $88 now. Uppercase : I GOT $88 NOW. Lowercase : i got $88 now. Switched Cases : i GOT $88 DOLLARS. More Spaces : I g o t $ 8 8 n o w . Without Spaces : Igot$88now. Reversed : .won 88$ tog IExplanation / Answer
I HAVE THIS SAME ASSIGNMENT... DID YOU FIGURE OUT HOW TO DO IT?? NEED HELP BADLY!!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.