About cin.get()

i can’t understand what does cin.get() is trying to do

There are two ways to input a string - cin.get(s) and cin.getline(s)
cin.getline() is used to input white spaces as well.
For example, if the input string is “Hello World”.
If we used cin.get(s), cout<<s will display “Hello”.
If we used cin.getline(s), cout<<s will display “Hello World”.

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.