Lewati pointer ke fungsi

#include<stdio.h>

//pass the simple pointer to the function

void swapnum(int* i, int* j)
{
  	int tmp = *i;
  	*i = *j;
  	*j = temp;
}

int main()
{
  	int a = 10;
  	int b = 20;
  	swap(&a,&b);
  	printf("A is %d and B is %d\n", a , b);
  	return 0;
}
Glamorous Guanaco