Question: Here is what you need to do: Put a comment to the side of each line explaining what that line of code accomplishes. Then answer

 Here is what you need to do: Put a comment to

Here is what you need to do:

Put a comment to the side of each line explaining what that line of code accomplishes. Then answer the following questions (please number your answers and place your responses in the comments box when submitting your second program) ...

1. What is the maximum number of characters you can input? 2. What happens when you enter more than this number? 3. What is passed to the *getnchar() function? 4. What is returned from the *getnchar() function? 5. What happens when you press ctrl-d before any input? Why? (Which line of code effects this?) 6. What change would you need to make to allow the user to enter up to 50 characters into input[]. 7. Aside from pressing ctrl-d at the beginning of a line, is there any way to enter less than 9 characters?

/*Programming Exercise 11-1 / #include #define LEN 10 char getnchar (char * str, int n); int exerl(void) char input [LEN] char *check; getchar ()i printf("Please enter 9 characters: "); check = getnchar (input, LEN - 1); if (checkNULL) puts ("Input failed."); else puts (input); puts ( "Done. " return 0; char getnchar (char * str, int n) int i; int ch; for (i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!