C
40
file c
Guest on 11th February 2023 01:22:43 PM
#include <stdio.h>
#include <stdlib.h>
int main(void) {
FILE
* input
= fopen("input", "r");
// FILE * output = fopen("outptut", "w");
FILE
* output
= fopen("outptut", "a");
char string[80];
int a;
char c;
int sum = 0;
while ((c
= getc(input
)) != EOF
) {
//fprintf(output, "%c", c);
}
fputs("\nhi there\n", output
);
printf("reached end of file\n");
}
input
= fopen("input", "r");
if (input == NULL) {
}
while (fgets(string
, 80, input
) != NULL
) {
}
input
= fopen("numbers", "r");
while(fgets(string
, 80, input
) != NULL
) {
}
return 0;
}
Raw Paste
Login or Register to edit or fork this paste. It's free.