Answers:
In C programming language, whenever scanf() function encounters space, it stops taking further more input for a particular variable. ^ is the caret operator and it helps us to ignore a particular character. Thus, when we write "^\n" in scanf() function, we will be able to write strings with spaces (like hello world) and also be able to store in a particular variable, until \n (here, \n is Enter key) is encountered. For more, click https://www.quora.com/What-is-scanf-n
Login to add comment