Mail Archives: djgpp/1997/10/20/04:17:23
A very bad program:
-------------------
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fd;
int i = 0;
char cad[100];
system("ls *.c > __tmp");
/* UNIX : system("ls *.c > __tmp");*/
fd =fopen("__tmp","r+");
fscanf(fd,"%s",&cad);
while(!feof(fd))
{
printf("file(%d) = %s\n",i,cad);
i++;
fscanf(fd,"%s",&cad);
}
}
Good Luck!
______________________________________________________________________________
|\\/\/\/\/\/| _____________ |
| | / \ | Miguel Murillo
| | | Elvis is | | mmurillo AT ideafix DOT cps DOT unizar DOT es
| __ __ | | dead ! | | Voice: +34-976-761000 ext. 5052
| | | | | | | | | Fax: +34-976-761882
C\ |0 | |0 | /O | bart. | |
| "" _ "" | \_ __________/ | Laboratorio de Investigacion en
| | // | TEcnologias de la Combustion (CSIC)
\'-----'/ --' |
_____/-----\_____ | Computer:bart.cps.unizar.es
/ | | \ | (155.210.32.114)
____________________________________|_________________________________________
Linux: The choice of a GNU generation
"My opinions are my own, and I've get *lots* of them!"
- Raw text -