Pointer - Call-by-reference
/* Call-by-value does not work*/
#include <stdio.h>
void swap(int , int );
main()
{ int a = 3, b = 7;
printf("%d %d\n", a, b); /* 3 7 is printed */
swap(a, b);
printf("%d %d\n", a, b); /* 3 7 is printed */}
void swap(int p, int q)
{ int tmp;
tmp = p; p = q; q = tmp; }