I need to create a program that asks the user to input a string from the keyboar
ID: 3638851 • Letter: I
Question
I need to create a program that asks the user to input a string from the keyboard using pointers.It needs to print out all the individual words in the string, each on a seperate line. And a word is defined as a series of characters terminated by a space or NULL. If you want you can use one or more pointers as you see fit.Example: The user enters MY DOG IS BIG[ENTER]
Start at the beginning of the string, move your pointer along and print MY - when you hit a space move your pointer to the start of the next word. Print DOG.
Repeat the process until you reach the NULL.
I would like to see a basic string function, and I will need to be able to test for multiple spaces between words, and for spaces at the beginning and at the end
Explanation / Answer
#include #include #include #include #include void main() { clrscr(); char text[100]; int i=0; clrscr(); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.