#include <stdio.h>
#include <stdlib.h>

int main(void) {

 FILE *p_to_f;
 char buf[1024];
 int i, j = 0;

 p_to_f = fopen("test","r");

 if(p_to_f == NULL) {
  perror("fopen");
  exit(EXIT_FAILURE);
 }

 for(i = 0; i < 4 && !feof(p_to_f); i++) {
  fgets(buf,1024,p_to_f);
  printf("%s", buf);
 }

 fclose(p_to_f);

 return 0;

}

I expect that be well what I did.  Thanks Victor.

PD Corrigeme Si hay algo malo. :D

-- 
Concepción, Chile.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to