(C Programming only) Pleasegive comments onto where each code should be added.
The codes:
Readline.c
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include “readline.h”
int read_line(char str[], int n)
{
int ch, i = 0;
while (isspace(ch = getchar()))
;
str[i++] = ch;
while ((ch = getchar()) != ‘n’) {
if (i < n)
str[i++] = ch;
}
str[i] = ”;
return i;
}
Readline.h
#ifndef READLINE_H
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int read_line(char str[], int n);
#endif
Request.c
#include <stdio.h>
#include <stdlib.h>
#include “request.h”
struct request *append_to_list(struct request *list){
int room_number;
printf(“Enter room number: “);
scanf(“%d”, &room_number);
while (getchar() != ‘n’);
struct request *ptr = list;
if(list
OR
OR