AOC_2022/4/tuer4.c

23 lines
398 B
C
Raw Normal View History

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