The main method in C which calls all the above functions is: #include int main(){   int s1[100], s2[100], n, m, result[200];   scanf("%d",&n);   scanf("%d",&m);   initialize();  //initializes the set s1   initialise();  //initializes the set s2   display(Set s1);  //displays the elements of set s1   display(Set s2);  //displays the elements of set s2   addNode(Set s1, int n); // add element n into the set s1   contains(Set s1, int m); // search for element m in the set s1   getUnion(Set result, Set s1, Set S2);   intersection(Set result, Set s1, Set s2);   difference(Set result, Set s1, Set s2);   symmetric difference(Set result, Set s1, Set s2);   subset(Set s1, Set s2);   disjoint(Set s1, Set s2);   equal(Set s1, Set S2); return 0; } Note:  Please fix some of the functions cause it causes run time error, I have already used up 2 follow up questions on this, Please Send an image of a sample run and output of this code please, and find out why it wont run and modify some of the codes so that it will run.

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

The main method in C which calls all the above functions is:

#include<stdio.h>
int main(){
  int s1[100], s2[100], n, m, result[200];
  scanf("%d",&n);
  scanf("%d",&m);
  initialize();  //initializes the set s1
  initialise();  //initializes the set s2
  display(Set s1);  //displays the elements of set s1
  display(Set s2);  //displays the elements of set s2
  addNode(Set s1, int n); // add element n into the set s1
  contains(Set s1, int m); // search for element m in the set s1
  getUnion(Set result, Set s1, Set S2);
  intersection(Set result, Set s1, Set s2);
  difference(Set result, Set s1, Set s2);
  symmetric difference(Set result, Set s1, Set s2);
  subset(Set s1, Set s2);
  disjoint(Set s1, Set s2);
  equal(Set s1, Set S2);
return 0;
}

Note: 

Please fix some of the functions cause it causes run time error, I have already used up 2 follow up questions on this, Please Send an image of a sample run and output of this code please, and find out why it wont run and modify some of the codes so that it will run.

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

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