General code doubt


can you please explain what has been done in line 16 to line 20

hello @sneha23

in line 16, we are finding index of string f in string searchIn[x].

if the string is present in serachIn[x] (as substring) then we are simply printing it.

if string f is not present in searchIn[x] then in that case find function will return npos constant which is predefined in c++. so we using that value as indicator to detect wheter string f is present or not in searchin[x]

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.