| simple-append.c - Tilføjelse af tegn til en tekstfil. | Lektion 10 - slide 11 : 28 Program 1 |
#include <stdio.h>
int main(void) {
FILE *output_file_pointer;
char *str = "Another string";
int i;
output_file_pointer = fopen("first-file", "a");
while (*str != '\0'){
fputc(*str, output_file_pointer);
str++;
}
fclose(output_file_pointer);
return 0;
}