Professional Documents
Culture Documents
c. Write a function
int sequential_search(struct student st_db *, int num_stduent, int
roll_no);
The function will go through the full array, and try to check if the provided
roll_no is present in the array or not. If yes returns the index of the array.
Otherwise returns -1.
int main(){
int mesh_type = 0;
}
struct hostel {
};
Create array of hostels – having three members. – SHR, BHR, MHR …
Fill the information appropriately.
Write a function
print_stduent_by_hostel_name(
struct student *st_db,
int num_students,
struct hostel *hs-db,
int num_hostel,
char *hostel_name);
– which will print all the names of the stduents who resides in the Hostel
hostel_name.
Write a function
print_students_who_are_vegeterian(
struct student *st_db,
int num_students,
struct hostel *hs-db,
int num_hostel,
)
- print the names of the student who stays in a hostel whose mesh type
is VEG.
Use the same structure of students and the database created in the
previous questions.