Doubt regarding two strings used in program

Why there aretwo strings one expr in main and another str in function checkExpression.If we will iterate over str string isn’t it different string?

Hey
str is a parameter in the function checkExpression, the call to checkExpression has been given in the main function, the copy of string str is passed to checkExpression and it is the named as parameter expr, so string is same, just passed as a copy with a different name.

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.