wip please don't look at it, it is very shy.
This commit is contained in:
parent
015209f0ed
commit
8761a5a488
1000
4/input.txt
Normal file
1000
4/input.txt
Normal file
File diff suppressed because it is too large
Load Diff
23
4/tuer4.c
Normal file
23
4/tuer4.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
int main() {
|
||||
FILE *input_file = fopen("./input.txt", "r");;
|
||||
|
||||
fseek(input_file, 0, SEEK_END);
|
||||
int if_size = ftell(input_file);
|
||||
fseek(input_file, 0, SEEK_SET);
|
||||
|
||||
char input[if_size];
|
||||
char c;
|
||||
|
||||
do {
|
||||
c = fgetc(input_file);
|
||||
strncat(input, c, 1);
|
||||
} while(c != (char)-1);
|
||||
|
||||
printf("%s", input);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user