The Question can be seen in the image: Question
The following is the sample run info for the code: Test info for the Question
Please refer to the links above for better understanding of the question.
I looked at some solution using pointers but I don't really understand, would it be possible to write the solution without pointers and only arrays.
#include /* Include header file for printf */
#define maxV 100 /* Define a constant */
int V, E, x, y; /* Declare variables */
int a[maxV][maxV]; /* Declare a two dimensional array */
int b[maxV][maxV]
int count = 0; /* Declare and initialize variable */
void read_graph(void); /* Function prototype */
void print_graph(void);
void print_graph_grid(void);
void copy_array(void);
void main() {/* Main program. */
read_graph(); /* call function to input graph adjacency matrix */
//print_graph(); /* call function to output graph adjacency matrix */
print_graph_grid();
> copy_array();
}
void read_graph( void ) {/* Function to read graph adjacency matrix */
int edge, x;
printf("\nInput number of vertices :");
scanf("%d", &V);
if (V > maxV)
printf("Exceed the maximum number of vertices permitted");
else {
for (x=1; x