Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Part II (15 Marks) 1. 5 Marks] Write a C++ program that reads a C-String (char array) line of the maximum size 200. The

C++ image text in transcribed

Part II (15 Marks) 1. 5 Marks] Write a C++ program that reads a C-String (char array) line of the maximum size 200. The program will count and display the total number of words in the line, and the count of the words that start with the uppercase and lowercase letters. Assume no more than one space is used to separate the words. with the If a word starts with an uppercase letter then replace its first character with the corresponding lowercase letter, or if it starts with a lowercase letter then replace its first character with the corresponding uppercase letter. Display the modified new line as shown in the sample output. corresponding uppercase letats with a lowercase letter then Sample Input and Output: Enter a line of text: the legend Of zelda breath 0f The wild. otal Words 8 owercase Words: 5 Uppercase Words:3 New line The Legend of Zelda: Breath of the Wild. Enter a line of text: life. What Is It But A Dream? Total Words: 7 Lower case Words 1 ppercase Words 6 New line Life what is it but a dream

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions