What is the purpose of cin.get( )?

what does cin.get( ) do in this program?

char ch = cin.get( ) meant that ch can take ’ ', ‘\t’ , ‘\n’ but what does it mean here?

as bhaiya mentioned it is used to consume the extra enter that we add
we see a odd behaviour if we do not use cin.get()
the cin.getline() takes the ‘enter’ also as its input and by this we are only able to take in n-1 string which will lead to wrong behaviour of the program