summaryrefslogtreecommitdiff
path: root/libc/tests/line2.c
blob: 6cc11ff8d5ca64bb09f44ce9c3769eb8f2110f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

#include <stdio.h>

char buf[256];

main()
{
   FILE * fd;
   fd = fopen("/etc/passwd", "r");

   while(fgets(buf, sizeof(buf), fd) != NULL)
   {
      printf(">>%s", buf);
   }
}