The next program, containing a short procedure, called augment, illustrates how C does changeable parameters, or rather how it lets you, the programmer, simulate changeable parameters through the use of pointers. augment() has two parameters but no return value because it changes the values of the variables linked to those parameters. void augment (int *parm1, int parm2) { *parm1 += parm2; } int main() { int k=15, l=20, z=-4, w=6; augment (&k, l); /* after this k is changed to be k+l */ augment (&z, w); /* same idea */ } |