Witajcie,

powiedzcie co jest złego w tym kodzie, bo sie wysypuje przy funkcji write:

int main(int argc, char const *  argv[]) {

int n, i, m, x;
char buffer [100];

scanf("%d", &n);

for(i=0; i < n; i++) {

snprintf(buffer, 100, "plik_%d.txt", i);
int fd = open(buffer, O_RDWR | O_CREAT, 0600);


write(fd, x, sizeof(i));
close(fd);
}	

return 0;
}

Te x to jest i, tam jest błąd.