• Type the C-program that adds a * (star) symbol between each character of a sentence entered from the keyboard.
Added by Matthew C.
Close
Step 1
h> #include <string.h> char sentence[100]; int addStar(char *s, int n) { for (int i = 0; i < n; i++) { s[i] = *s++; } return s; } Show more…
Show all steps
Your feedback will help us improve your experience
Chandra Jain and 92 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
write a program to add 2 no s' in c language?
Chandra J.
(Random character) Write a program that displays a random uppercase letter.
Write a program that asks the user to enter a string. The program should create a new string called new_string from the user's string such that the second character is changed to an asterisk and three exclamation points are attached to the end of the string. Finally, print new_string. Typical output is shown below: Enter your string: Qbert Q*ert!!!
Liam H.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD