Code:
scanf("%[^\n]",line);
tell me the logic of this scanf statement and why " [^\n] " is used instead of %s ...
and how this statement works...

i know that this statement inputs lines till enter is pressed..

but what is the format of the scanf statements please tell...