scanf() with %s
as format specifier reads a sequence of characters starting from the first non-whitespace character until (1) another whitespace character or (2) upto the field width if specified (e.g. scanf("%127s",str);
-- read 127 characters and appends null byte as 128th), whichever comes first. And then automatically append null byte at the end. The pointer passed my be large enough to hold the input sequence of characters.
You can use fgets to read the whole line:
fgets(comment, sizeof comment, stdin);
Note that fgets reads the newline character as well. You may want to get rid of the newline character from the comment
.