2078 4

CSC166 ยท 2078 ยท 5 marks

What is the use of get and getline functions? Explain with suitable example.

What is the use of get and getline functions? Explain with suitable example. [5]

Object Oriented ProgrammingChapter 8: File handlingUnformatted Input/Output

Both get() and getline() are input functions in C++ used to read character(s) or strings from the input stream (cin). They are particularly useful when reading input that includes whitespace characters (spaces, tabs, newlines), which the standard operator cannot handle properly. --- The get() fun...