Ass3 setb
Ass3 setb
int main()
{
int adjacencyMatrix[MAX_VERTICES][MAX_VERTICES] = {0};
int numVertices, numEdges, i, j, source, destination, startVertex;
return 0;
}
/*Set B
a) Write a C program that accepts the vertices and edges of a graph and store it
as an adjacency matrix. Implement function to traverse the graph using Breadth
First Search (BFS) traversal.*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main()
{
int adjacencyMatrix[MAX_VERTICES][MAX_VERTICES] = {0};
int numVertices, numEdges, i, j, source, destination, startVertex;
return 0;
}
visited[startVertex] = true;
printf("%d ", startVertex + 1);
queue[rear++] = startVertex;