これがばかげた質問であるならば、申し訳ありませんが、私はかなり新しいです!
私はこれを持っています:
fgets(question,200,stdin);
char *memq = malloc(sizeof(strlen(question)));
memq= question;
ただし、質問変数の末尾には常に新しい行があります。どうすればこれを削除/防止できますか?
私はこれを試しました:
fgets(question,200,stdin);
char *memq = malloc(sizeof(strlen(question))-sizeof(char));
memq= question;
効果はありませんでした!