Vivek and Party Checking eof

How can i check EOF for this question.

you can do something like this in this Q…

 int n;
 while(cin>>n)
 {
      string s[n];
      lop(i,0,n) cin>>s[i];
 }