C PROGRAM TO IMPLEMENT EDGE CHASING DEADLOCK DETECTION ALGORITHM

Saturday, 7 January 2017


#include<stdio.h>
#include<conio.h>
void main()
{
 int d[7][7];
 int i,j,n,a;
 int res;
 clrscr();
 printf("Enter the number of nodes\n\n");
 scanf("%d",&n);
 printf("Enter the elements of Dependency matrix");
 for(i=0;i<n;i++)
 {
   for(j=0;j<n;j++)
   {
  scanf("%d",&d[i][j]);
   }
  }
  d[0][1]=1;
  d[1][2]=1;
  d[2][3]=1;
printf("DEPENDECNY MATRIS IS:\n");
 for(i=0;i<n;i++)
 { for(j=0;j<n;j++)
  {
 printf("%d",d[i][j]);
  }
 }
  getch();
}

OUTPUT-



1 comment

  1. Hi to everybody, here everyone is sharing such knowledge, so it’s fastidious to see this site, and I used to visit this blog daily.
    tutorial on c++

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...
Related Posts Plugin for WordPress, Blogger...
 

Most Reading

Labels