A small snippet of the code:
#include<stdio.h>
#define maxx 101
int Q[maxx];
int first ,last;
int node, edge;
char linker[maxx][maxx];
char var[maxx];
int path[maxx];
void Ini() {
int i, j;
for(i = 1; i<= node; i++) {
for(j = 1; j<= node; j++) {
linker[i][j] = 0;
}
path[i] = i;
var[i] = 0;
}
}
//Inserts element in the Q ie ENQUEUE
void Insert(int n) {
Q[last++] = n;
last %= maxx;
}
rest in here click: http://codetolearn.blogspot.com/2010/12/bfs-algorithm-in-c.html
#include<stdio.h>
#define maxx 101
int Q[maxx];
int first ,last;
int node, edge;
char linker[maxx][maxx];
char var[maxx];
int path[maxx];
void Ini() {
int i, j;
for(i = 1; i<= node; i++) {
for(j = 1; j<= node; j++) {
linker[i][j] = 0;
}
path[i] = i;
var[i] = 0;
}
}
//Inserts element in the Q ie ENQUEUE
void Insert(int n) {
Q[last++] = n;
last %= maxx;
}
rest in here click: http://codetolearn.blogspot.com/2010/12/bfs-algorithm-in-c.html
even if u don't keep a check, i will paste it here..
for knowing more about coding n stuff.. you can visit www.codetolearn.blogspot.com