Write a program to take in a sentence in the fom of a character rearrange the words in the sentence so that all the words are revers alphabets in the word will be reversed but other non-alphabets such symbols are unaffected (Please refer to the example of the output inte Your program needs to display the original sentence and the modifi

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Code it. Code with explanation. 

 

1. Write a program to take in a sentence in the fom of a character string. Then
rearrange the words in the sentence so that all the words are reversed. Only the
alphabets in the word will be reversed but other non-alphabets such as digits and
symbols are unaffected (Please refer to the example of the output interface below).
Your program needs to display the original sentence and the modified sentence.
The number of characters, including blanks and other symbols with the NULL
character excluded should be displayed. The length of the string needs to be
displayed as well.
After that, the program shall sort the string in the following order: lowercase
characters, uppercase characters, digits and other symbols. Then the sorted
sentence should be displayed.
You need to print out your name, ID and class on the screen when the program
starts.
Note: The sentence must be stored in a one-dimensional character array utilized
as string. The modified sentence must be stored in a separate string.
An example of the output interface:
a "C:Documents and Settings udministratorWy DocumentsVisual_CDebuglinvert_sentence.
Prepared by ABC
Clasa XYZ
This program will take in a sentence from you and invert the letters in each ind
ividual worda.
Type in a sentence with no more than 100 characters including space:
I an H15T CPd4 7*gH
String length is 19
The original sentence is I am H15T CPd4 7*gH
The modified sentence is I ma H15T APC4 7*Hg
The sorted sentence is
Press any key to continue...
adgmCHHIPT1457
Transcribed Image Text:1. Write a program to take in a sentence in the fom of a character string. Then rearrange the words in the sentence so that all the words are reversed. Only the alphabets in the word will be reversed but other non-alphabets such as digits and symbols are unaffected (Please refer to the example of the output interface below). Your program needs to display the original sentence and the modified sentence. The number of characters, including blanks and other symbols with the NULL character excluded should be displayed. The length of the string needs to be displayed as well. After that, the program shall sort the string in the following order: lowercase characters, uppercase characters, digits and other symbols. Then the sorted sentence should be displayed. You need to print out your name, ID and class on the screen when the program starts. Note: The sentence must be stored in a one-dimensional character array utilized as string. The modified sentence must be stored in a separate string. An example of the output interface: a "C:Documents and Settings udministratorWy DocumentsVisual_CDebuglinvert_sentence. Prepared by ABC Clasa XYZ This program will take in a sentence from you and invert the letters in each ind ividual worda. Type in a sentence with no more than 100 characters including space: I an H15T CPd4 7*gH String length is 19 The original sentence is I am H15T CPd4 7*gH The modified sentence is I ma H15T APC4 7*Hg The sorted sentence is Press any key to continue... adgmCHHIPT1457
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY