In this code 1-both part not running string part and arrary part without function 2-in string subarrY multple n line is printing why?
Hey @kailash_01 if you are using getline() after taking some inputs you have to Use, cin.ignore() before calling getline() or alternatively you can use cin instead of getline().
Let me know if you still face some issue.
declare a character array like char a[N]; or a string object like string a; and then use cin >> a;
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.