tweaks in C

What does following code mean ?

scanf(“%[^a]“,dummy);

It means that continue accepting a string before you encounter the character ‘a’. This can be used to input a string containing white space characters by putting ‘\n’ as the character where to stop.

Leave a Reply

You must be logged in to post a comment.