+ 2
What is scanf(%[^\n]s ) about String??
I found the first use in Challenge questions.Please explain me about this.
3 odpowiedzi
+ 3
it is used for input string
Here, [] is the scanset character. ^\n tells to take input until newline doesn’t get encountered. Then, with this %*c, it reads newline character and here used * indicates that this newline character is discarded.