Hey!
How does this work:
Like what does this >>>>%[^\n]<<<< do? I mean, how does it work?Code:scanf("%[^\n]", x)
Thanks
Printable View
Hey!
How does this work:
Like what does this >>>>%[^\n]<<<< do? I mean, how does it work?Code:scanf("%[^\n]", x)
Thanks
anything but a newline.
google regular expresions
>google regular expresions
scanf doesn't have regular expressions.
These are scan sets ( or inverted scan sets if they begin with a ^ )
> Like what does this >>>>%[^\n]<<<< do? I mean, how does it work?
Think of %s being similar to %[^ \t\r\n]
what this basically saying is read anything from the input buffer other than '\n' charCode:%[^\n]
ssharish2005