CodePudding user response:
Value transmission,,,,,,,,CodePudding user response:
Change methods of a, b, and the main method of p, q no relationship, just at the time of method calls, a=p, b=q do copy the argument to the parameter of the parameters, and then they will cut off the relationship broke up, namely a, b is the change the scope of the method, p, q scope in the main, they are not related to each other,CodePudding user response:
First the inside of the method of defining your values is indeed exchange but did not go to print with no return value the significance of this approach is that what you callPut your output statements one at the end of the method