Professional Documents
Culture Documents
SET A(1)
#include<stdio.h>
#include<stdlib.h>
int vertex;
}node;
node *v[10];
void create(int m[10][10], int n)
int i,j;
v[i] = NULL;
if(m[i][j]==1)
newnode->next = NULL;
if(v[i]==NULL)
}
else
temp= newnode;
void display(int n)
int i;
printf("\nv%d | ",i+1);
temp = v[i];
while (temp)
printf("null");
void main()
{
int m[10][10],n,choice;
scanf("%d",&n);
while(1)
printf("1.create\n2.display\n3.exit");
printf("\nEnter ur choice:");
scanf("%d",&choice);
switch(choice)
{
case 1:
create(m,n);
break;
case 2:
display(n);
break;
case 3:
exit(0);
1.create
2.display
3.exit
Enter ur choice:1
1.create
2.display
3.exit
Enter ur choice:2
v3 | v4 -> null
v4 | null
1.create
2.display
3.exit
Enter ur choice:3*/