All pastes #895596 Raw Edit

Something

public text v1 · immutable
·published 2008-02-07 23:00 UTC
rendered paste body
== WITN CHAR ==

#include <stdio.h>

void swapnum(char *i, char *j) {
  *i = "omg";
  *j = "bomg";
}

int main(void) {
  char asd;
  char asdb;

  swapnum(&asd, &asdb);
  printf("A is %s and B is %s\n", asd, asdb);
  return 0;
}

== WITN INT ==

#include <stdio.h>

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

int main(void) {
  int a = 10;
  int b = 20;

  swapnum(&a, &b);
  printf("A is %d and B is %d\n", a, b);
  return 0;
}