repo.or.cz
/
archive.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
update
[archive.git]
/
Apkawa
/
Study
/
pascal
/
test.c~
blob
724d6d624cb74aa9d758c07a9e08f0407172f60d
1
#include <stdio.h>
2
#include <stdlib.h>
3
#define PATH "test.data"
4
/*
5
* Apkawa <apkawa@gmail.com>
6
*/
7
8
int main ( int argc, char *argv[] )
9
{
10
11
FILE *in_file;
12
char line[256];
13
int ch;
14
int i = 0;
15
16
in_file = fopen( PATH , "r");
17
while( ( ch = fgetc( in_file )) != EOF ) {
18
if (ch != '\n'){
19
line[i] = (char) ch;
20
i++;
21
}
22
}
23
line[i] = '\0';
24
printf("%s\n", line);
25
return EXIT_SUCCESS;
26
} /* ---------- end of function main ---------- */