There's nothing really special about them.
%[\n] (which isn't what you have in the code) reads (and stores in the provided array) as many consecutive newlines as possible
%[^\n] (which you have in the code) reads (and stores in the provided array) as many characters as possible until it encounters (and doesn't process) a newline
%*c reads (and doesn't store anywhere) a single character, which is a newline in this case, because the preceding %[ was until a newline.
If the i/p were: sam likes football
then "sam" is stored in s and " likes football"(including space) is stored in t.
But according to ur explanation u say %*c reads (and doesn't store anywhere) a single character.So,I don't really understand %*c yet.Can u pls explain it again.
If your input was "sam likes football", you pressed Enter at the end of that input, so the data entered were actually "sam likes football\n". %[^\n] took "likes football" and left \n unprocessed, %*c took the \n