Why did we use getline(cin,s[i]);

can you explain the for loop why did we use getline(cin,s[i]);
what does that do. can you explain the program more briefly

@tarunasree123 its just a way to input array of strings , you can simply use cin>>s[i] too no issues

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.