#include <iostream>
using namespace std;
int main()
{
const int SIZE=4;
char Sentence[SIZE];
char Sentence2[SIZE];
cout << "Enter the sentence" <<endl;
cin >> Sentence;
cout << "\nThe string read with cin was"
<< endl <<Sentence <<endl;
char ch = cin.get();
cout << "Enter the second sentence: "<<endl;
cin.get(Sentence2,SIZE,'$');
cout << Sentence2 <<endl;
}
OUTPUT
Enter the sentence
This is my first sentence
The string read with cin was
This
Enter the second sentence:
is
I have just started learning C++ and I am not able to understand this program as well as it's output. Pls can anyone suggest me where to learn it from or explain it in detail .