/* Program to display list of .C files in a directory */
#include<stdio.h>
#include<conio.h>
#include<dir.h>
void main()
{
int done;
struct ffblk a;
clrscr();
printf("Press any key to view the .C files in the current directory\n");
getch();
done=findfirst("*.c",&a,0);
while(!done)
{
printf("%s\n",a.ff_name);
done=findnext(&a);
}
getch();
}
#include<stdio.h>
#include<conio.h>
#include<dir.h>
void main()
{
int done;
struct ffblk a;
clrscr();
printf("Press any key to view the .C files in the current directory\n");
getch();
done=findfirst("*.c",&a,0);
while(!done)
{
printf("%s\n",a.ff_name);
done=findnext(&a);
}
getch();
}
No comments:
Post a Comment