/* CSE 333 Su12 Lecture 4 demo: brokenswap.c */
/* Gribble/Perkins */

/* What output does this produce?  Why? */

#include <stdio.h>

/* interchange values of parameters a and b */
void swap(int a, int b) {
  int tmp = a;
  a = b;
  b = tmp;
}

int main(int argc, char **argv) {
  int a = 42, b = -7;

  swap(a, b);
  printf("a: %d, b: %d\n", a, b);
  return 0;
}