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 big.
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 big.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education