Question: Exercise 9 1 2, I need help with this exercise and also can you show the output for better understanding the step of the program.
Exercise 9 1 2, I need help with this exercise and also can you show the output for better understanding the step of the program.
Write a program that lets the user enter any number of lines of text, one at the time. In this effect, this creates a primitive editor that permitstext entry but not editing of a line of text after its been entered. Set up a loop that doesnt terminate until the user press enter without typing any text (a zero-lenngth string).
Alternatively, you can recognize a special code ( for example, @@@) to terminate the session. You can then use strcmp ("string compare") function to detect this string. You may recall that what this function does is to compare two C-strings and return 0 if they have the same contents.
if (strcmp(input_line, "@@@) == 0) {
break;
}
Remember to print a short prompt before each line of the text, such as the following:
Enter (@@@ to exit) >>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
