0
[SOLVED] Confusion in C scanf()
What does %10 mean here; char str[11]; scanf("%10[0-9a-zA-Z ]", str); Source: https://stackoverflow.com/a/1247993
3 RĂ©ponses
+ 3
The number means the maximum characters to be stored into str. Extra characters will be stored into buffer.
Check the comments under the answer in the original post. They also mentioned that.
https://www.sololearn.com/learn/C/2914/
+ 1
CarrieForle seen but, still confused...
I knew we can do that for limit the input length.
But no format specifier like s, c , d, etc. used there.
I don't find comment relating to this?
+ 1
Bibek Oli AProgrammer and paxdiablo has discussed the s under the answer.