SINGLE LEVEL DIRECTORY
#include<stdio.h>
#include<conio.h>
main()
{
int master,s[20];
char f[20][20][20];
char d[20][20];
int i,j;
clrscr();
printf("enter number of directorios:");
scanf("%d",&master);
printf("enter names of directories:");
for(i=0;i<master;i++)
scanf("%s",&d[i]);
printf("enter size of directories:");
for(i=0;i<master;i++)
scanf("%d",&s[i]);
printf("enter the file names :");
for(i=0;i<master;i++)
for(j=0;j<s[i];j++)
scanf("%s",&f[i][j]);
printf("\n");
printf(" directory\tsize\tfilenames\n");
printf("*************************************************\n");
for(i=0;i<master;i++)
{
printf("%s\t\t%2d\t",d[i],s[i]);
for(j=0;j<s[i];j++)
printf("%s\n\t\t\t",f[i][j]);
printf("\n");
}
printf("\t\n");
getch();
}
Please upload program for ACYLIC GRAPH DIRECTORY
ReplyDeletePlease upload program for ACYLIC GRAPH DIRECTORY
ReplyDeleteThis comment has been removed by the author.
ReplyDelete********* means you to write the code neatly
ReplyDeletehow to compile and run this program on linux?
ReplyDeleteI means commands
gcc file_name.c
ReplyDelete./a.out