What's the use of scanf("%[^\n]% *c") in C programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What's the use of scanf("%[^\n]% *c") in C programming?

19th Apr 2020, 1:19 PM
Dini Shiba
Dini Shiba - avatar
1 Answer
+ 3
It is used to accept string which have whitespace in between. %s can't do that so this is used.
19th Apr 2020, 1:45 PM
Peter Parker
Peter Parker - avatar