/* IMPLEMENT YOUR FUNCTIONS HERE */ RECORD find_by_restaurant_name(char *restaurant_name, RECORD *restaurant_array, unsigned long size, unsigned long start, unsigned long end) /* P_found <- NULL p_found <- find the RECORD with given restaurant_name in restaurant_array between start and end (p_found does not change if no such RECORD is found) return p_found */

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

in c!!!

code will be written according to the instructions!!

restaurant.c) No Selection
1
#include <stdio.h> // Do not edit these directives or add another.
2
#include <stdlib.h>
3
#include <string.h>
#include <time.h>
#define MAX 1000 // Do not edit this macro.
7
8 typedef struct // Do not edit this struct.
9.
{
unsigned long restaurant_id;
char restaurant_name[15];
10
11
12
char description[127];
13
double rate;
char cuisine[31];
unsigned short opening_year;
unsigned long capacity;
char city[31];
char address[63];
char owner[31];
14
15
16
17
18
19
20
} RECORD_t, *RECORD;
21
22
23
24
/* IMPLEMENT YOUR FUNCTIONS HERE */
25
26
RECORD find_by_restaurant_name(char *restaurant_name, RECORD *restaurant_array, unsigned long size, unsigned long start, unsigned long end)
27
{
28
/*
29
p_found <- NULL
30
p_found <- find the RECORD with given restaurant_name in restaurant_array between start and end (p_found does not change if no such RECORD is found)
31
return p_found
32
*/
33
}
34
35
Transcribed Image Text:restaurant.c) No Selection 1 #include <stdio.h> // Do not edit these directives or add another. 2 #include <stdlib.h> 3 #include <string.h> #include <time.h> #define MAX 1000 // Do not edit this macro. 7 8 typedef struct // Do not edit this struct. 9. { unsigned long restaurant_id; char restaurant_name[15]; 10 11 12 char description[127]; 13 double rate; char cuisine[31]; unsigned short opening_year; unsigned long capacity; char city[31]; char address[63]; char owner[31]; 14 15 16 17 18 19 20 } RECORD_t, *RECORD; 21 22 23 24 /* IMPLEMENT YOUR FUNCTIONS HERE */ 25 26 RECORD find_by_restaurant_name(char *restaurant_name, RECORD *restaurant_array, unsigned long size, unsigned long start, unsigned long end) 27 { 28 /* 29 p_found <- NULL 30 p_found <- find the RECORD with given restaurant_name in restaurant_array between start and end (p_found does not change if no such RECORD is found) 31 return p_found 32 */ 33 } 34 35
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY