I want to ask something about the working of cin.getline()

I know that cin,getline() is used to read special character.
i want to know that in this program after cin>>n when I press enter does cin.getline() is reading enter(’\n’) both as a character and deeliminator.

Yes as by default deeliminator for getline is ‘\n’ only so when you does that. It read string till ‘\n’

You can check it here too
http://www.cplusplus.com/reference/string/string/getline/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.