Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

an According to Wikipedia, an anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all

image text in transcribed

an According to Wikipedia, an anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once For example, the word anagram can be rearranged into nag a ram, or the word binary into brainy Create a C code program called anagram.c that implements the anagram check. The program should require the user to input 2 words then returns code 0 if the words are anagrams, code 1 otherwise (please note that 0 or 1 should be returned as an integer number of type int) Compile your C code with gec and make sure that the executable generated by the compiler is called anagram Create also a BASH shell script called anagram test.sh that will be used to automate the process of testing the executable created by compiling your C code This bash script will be used at the command-line as follows /anagram test.sh The script will do the following in this order without prompting the user to input anything Clear the screen * Next, calls anagram by sending it the following 2 words: listen and silent. Checks the exit code of the anagram program. If it is zero, print to the screen: test succeeded. If not, print to the screen: test failed. * Next, calls anagram by sending it the following 2 words: listen and silence Checks the exit code of the anagram program. If it is one, print to the screen: test succeeded. If not, print to the screen: test failed. Finally the script terminates by displaying to the screen: "Execution of anagram program has ended successfully

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions