Answer:
void swapints(int *j,int *k)//Function definition.
{
*j=*j+*k-(*k=*j); //value swapping.
}
swapints(&j,&k);//call the function.
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.
Answer:
<h2 /><h2>Pseudocode</h2>
<h3>Advantages of Pseudocode:</h3>
- Easier to translate into a high level programming language
- No pressure of syntax (grammar) of the coding
- Partially resembles standard English so it's easier for programmers to understand
<h3>Disadvantages of Pseudocode:</h3>
- Can't immediately spot errors in coding such as logic errors
- Runtime errors don't exist in Pseudocode
<h2>Flowcharts</h2><h3 /><h3>Advantages of Flowcharts</h3>
- Focuses on the logic of the program
- Displays the manipulation (and flow) of data easily
<h3>Disadvantages of Flowcharts</h3>
- Not ideal for big programs (only for subprograms)
- Shapes may not be clear or obvious to what they are in terms of their functions
...a hot pluggable interface...