Sir can we use the \n in place of endl..pls reply
Yes, endl just prints a \n character and (manually) flushes the buffer (something that is usually unnecessary).
You don't notice the impact of the endl flush but it helps you debugging because everything which is printed is really on the screen. You can also #define endl '\n' when you release the code. Or in Visual Studio, you can also replace all occurences with Ctrl+F.
thanx sir for reply