我的代碼有問題。我需要在c中使用strtok()在字符串「Date WEEk Dae Due Toy De Dae i Date Due」中輸出單詞「Sing」和「Toy」(它們都在「Due」和「De」之間)唱德「。我試圖使用代碼中的if語句明確地輸出單詞「Sing」和「Toy」,但是我的代碼不會產生任何輸出,並且在編譯期間沒有警告。我只是C的初學者,請耐心等待。我聽說像strstr()這樣的其他
例子: void stringEvaluation(char *name){
if (strstr(name, "Tall") != NULL)
--here I would like to print only "John Doe"--
}
int main{
char name[160 + 1];
scanf("%[^\n]%*c", name