
394 Data Structures Using C
{
addNotVisited( notVisited,&Rear, adjMat[0][i]);
}
}
}
}
printf (“\n Final visited nodes...”);
dispVisited (visited, last);
}
void dispAdMat(char adjMat[8][8], int numV)
{
int i,j;
printf (“\nThe adj Mat is--\n”);
for (i=0; i<= numV; i++)
{
for (j=0; j<=numV; j++)
{
printf (“%c “, adjMat[i][j]);
}
printf (“\n”);
}
printf (“\n\n Enter any key to continue “);
getch();
}
/* This function checks whether a vertex is present on a Q or not */
int ifPresent (char Q[], int last, char vertex)
{
int i, result = 0;
for (i = 0; i <= last; i++)
{
if (Q[i] == vertex)
{ result = 1;
break;}
}
return ...