Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NEED THIS IN C please For the scramble.c problem, write a program that: - Has a main () function and another function that has this
NEED THIS IN C please
For the scramble.c problem, write a program that: - Has a main () function and another function that has this prototype: void scramble_str(char s[]) ; - The scramble_str () function scrambles the contents of the string in a random way so that the string has the same length as before, but the contents are all mixed around. It does this in-place, i.e., there is only one buffer that holds a string. You're free to scramble it any way you want to, but use rand () repeatedly so it gets really scrambled. - The main () function will read a string entered by the user into the buffer, call scramble_str (), and output the resulting string. This will be done in a loop forever, until the entered string is the string "bye". When the user says "bye", the program will exit with a polite message. - Do note that reading a string using scanf(), which is the only tool I've introduced you to so far, will just read up to the first whitespace. So, multiple-word strings won't work! Let's use something that will read up to a newline character: gets () . See the supplemental note and an example below. - Make the buffer 50 characters biaStep 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