/**************************************************************************** Дан бинарный файл, содержащий символы (тип char). Удалить из файла все цифры, если они следуют после знаков препинания. *****************************************************************************/ #include <stdio.h> #include <string.h> int main(int argc, char* argv[]) { int n = 0; char a[1000], ch[1000]; FILE* file = fopen("1.bin", "wb"); printf("\nput string into the file '1.bin'\n"); gets(ch); fwrite(&ch, sizeof(1000), 1, file); fclose(file); FILE* read = fopen("1.bin", "rb"); for (int i = 0; i < strlen(ch); i++) { fread(&a[i], sizeof(char), 1, read); if (isdigit(a[i])) { printf("true"); } printf("%c", a[i]); } fclose(read); printf("\n"); return 0; } Write a string to a binary file, you need to output it character by character. The problem is that this code displays only the first 4 characters and I cannot understand why.