read a sentence in c code example Example 1: how to read in sentences in c scanf(“%[^\n]s”, string); Example 2: how to read in sentences in c scanf("%[^'\n']s",str)