Code for PROGRAM THAT PROVIDES AN EXAMPLE OF GETLINE FUNCTION in C++ Programming
# include <iostream.h>
# include <conio.h>
main()
{
char name[20],city[20];
clrscr();
cout<<"PLEASE ENTER THE NAME:->";
cin.getline(name,20);
cout<<"PLEASE ENTER THE CITY:->";
cin.getline(city,20);
cout<<"NAME IS:->"<<name<<endl;
cout<<"CITY IS:->"<<city<<endl;
}