Computer Science, asked by bphariharan1301, 1 year ago

explain the function getline

Answers

Answered by shashank4212
2
So Basically in C++ we need to enter multiple strings in one go, like inputting a line or a paragraph.

The std :: cin does not facilitates this option for inputting multiple Strings in one Go.

So, C++ have getline() function to achieve this result.

In the older version of c++ when string (derived datatypes ) weren’t introduced, at that time it takes the input as string in the form of array of characters

Similar questions