Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes: "Hello! I'm Miley! Nice to meet you!"

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes:
"Hello! I'm Miley! Nice to meet you!"
1 #include <stdio.h>
2 #include <string.h>
3
4 void MakeSentenceExcited (char* sentenceText) {
/* Your solution goes here */
456700
8}
9
10 int main(void) {
11
12
13
14
const int TEST_STR_SIZE = 50;
char testStr[TEST_STR_SIZE];
fgets (testStr, TEST_STR_SIZE, stdin);
15 MakeSentenceExcited (testStr);
16 printf("%s", testStr);
17
10
notunna.
Transcribed Image Text:Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes: "Hello! I'm Miley! Nice to meet you!" 1 #include <stdio.h> 2 #include <string.h> 3 4 void MakeSentenceExcited (char* sentenceText) { /* Your solution goes here */ 456700 8} 9 10 int main(void) { 11 12 13 14 const int TEST_STR_SIZE = 50; char testStr[TEST_STR_SIZE]; fgets (testStr, TEST_STR_SIZE, stdin); 15 MakeSentenceExcited (testStr); 16 printf("%s", testStr); 17 10 notunna.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning