AOC_2022/4/tuer4.c
2022-12-04 16:10:53 +01:00

23 lines
398 B
C

#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;
}