summaryrefslogtreecommitdiff
path: root/klibc/klibc/tests/opentest.c
blob: 5a54d2fce256392ff26adbcd79844377b46e1c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

int main(void)
{
  char buffer[1024];
  FILE *f;

  f = fopen("/etc/passwd", "r");
  fgets(buffer, 1024, f);
  fclose(f);

  printf("Line 1 = %s", buffer);

  return 0;
}