How do I write to a specific line of file in c?
问题 So I have a project I am doing and I have created a program that allows the user to write to a file, as shown below: #include <stdio.h> #include <stdlib.h> FILE *fd; FILE *fw; struct store { char Word[512]; char NWord[512]; } stock; struct store2 { char Definition[512]; } stock2; char done='y'; int count=1; int c=0; int d=0; int main(void) { fw=fopen("Test Z W.txt","w"); fd=fopen("Test Z D.txt","w"); do { printf("Word %d: ",count); gets(stock.Word); while((c= getchar()) != '\n' && c != EOF);