I referred this link ,but I am unable to get the logic behind using %[^\n]%*c or %[^\t] as format specifier .
http://stackoverflow.c om/questions/14494309/reading-multiple-lines-of-input-with-scanf
And how to scan multiple lines of input when we don't know the end of input , say in those cases where we have an online compiler which would be giving its own input test cases which can be of any length and we are asked to perform some operation on that input so how will we determine how to scan the input since there we don't know the end of input ?
http://stackoverflow.c om/questions/14494309/reading-multiple-lines-of-input-with-scanf
And how to scan multiple lines of input when we don't know the end of input , say in those cases where we have an online compiler which would be giving its own input test cases which can be of any length and we are asked to perform some operation on that input so how will we determine how to scan the input since there we don't know the end of input ?
Comment