#include <iostream>

using namespace std;

void byref(int &x) {
  x++;
}

void byptr(int *x) {
  if (x != NULL) (*x)++;
}

int main() {

  int x= 0;

  cout << x << endl;
  byref(x);
  cout << x << endl;
  byptr(&x);
  cout << x << endl;

  return 0;
}