Question: Please write a C program for this problem . Basically, you need to make a Menu using a while loop to choose an option. Sample:

Please write a C program for this problem. Basically, you need to make a Menu using a while loop to choose an option.

Please write a C program for this problem. Basically, you need to

Sample:

make a Menu using a while loop to choose an option. Sample:

Please do it as soon as posible Exercise 1: Create and Display

Please do it as soon as posible

Exercise 1: Create and Display Graph Here you have to take number of nodes as input and the source and destination of connecting edge. After taking input display the full graph with number of edges and nodes Exercise 2: Add new vertex and edge Add a new vertex to the graph and add an edge between the two vertices of the graph. Exercise 3: Delete vertex Delete a vertex and its edges from the graph. Exercise 4: Traversal of graph (BFT and DFT) Given a graph find the Breadth First Traversal and Depth First traversal of the graph. To avoid processing a node more than once, we use a boolean visited array. For simplicity, it is assumed that all vertices are reachable from the starting vertex. #include int graph [50] [50]; int nodes; int edges; int main() { while(1) { printf("1. Create "); printf("2. Display "); printf("3. Add new edge "); printf("4. Delete edge "); printf("5. Add new vertex "); printf("6. Delete vertex "); printf("7. BFT traversal "); printf("8. DFT traversal "); int x; ; scanf("%d",&x); if(x==1) { createGraph(); } else if (x==2) { Output 1. Create 2. Display 3. Add new edge 4. Delete edge 5. Add new vertex 6. Delete vertex 7. BET traversal 8. DFT traversal 1 Enter number of nodes: 2 Enter number of edges: 1 3 2 1. Create 2. Display 3. Add new edge 4. Delete edge 5. Add new vertex 6. Delete vertex 7. BET traversal 8. DET traversal

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!