read sentence 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)