Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program in C that does the following: Has three character strings of 80 characters char inputString[80]; char reverseString[80] = char wordReverseString[80] =
Write a program in C that does the following: Has three character strings of 80 characters char inputString[80]; char reverseString[80] = "" char wordReverseString[80] = "" 1. Prompts and Reads a sentence from the user (max 80 characters) printf("%s ","Enter a sentence that is less that 80 characters"); scanf("%s",inputString); 2. Calls a function that receives the address of inputString and reverseString. That function copies the inputString into reverseString in the opposite order. It returns a pointer to reverseString. 3. Calls a function that receives the address of inputString and wordReverseString. That function creates a copy of inputString into wordReverseString with the words in the opposite order. It returns a pointer to wordReverseString. 4. Finally, it prints all three strings to the console. Example: If the user enters "The sky is blue" reverseString would hold "eulb si yks ehT" and wordReverseString would hold "blue is sky The"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started