我想逐行讀取文本文件內容並分配給我的變量。我怎樣才能做到這一點 ?我會寫在C並且不應該有'\ n'字符。 文本文件的內容: 9600
502
N
1
8
N
變量 int baudrate;
int port;
char parity;
char databits;
char stopbit;
while (fgets(line, sizeof(line), fil
程序應該將輸入數字的字符串和數字分隔符作爲輸入,並將4個單詞輸出到單獨的行中。 例 Please enter a digit infused string to explode: You7only7live7once
Please enter the digit delimiter: 7
The 1st word is: You
The 2nd word is: only
The 3rd