Answer:
void swapints(int *j,int *k)//Function definition.
{
*j=*j+*k-(*k=*j); //value swapping.
}
swapints(&j,&k);//call the function.
Step-by-step explanation:
- The above function definition takes the address of j and k variables which is stored on the pointer variable j and k.
- Then the pointer variable uses the j and k value for the above expression, and the user does not need to return the value of j and k.
- But when the user prints the value of the j and k variable, then he gets the swapping value of the j and k variable.
- The user needs to know that the "int j" is a normal variable, but "int *j" is a pointer variable that is used to take the address of j variable.