You have a few problems with your code. Here is what it should look like.
Code:
#include <stdio.h>
int test( int *x );
int main() {
int x = 1;
test(&x);
return 0;
}
int test(int *x) {
printf("X = %i\n", *x);
++(*x);
printf("X Now = %i", *x);
return 0;
}
When you pass a regular variable to a function as a pointer you need to pass the address of it. Also you have to dereference the pointer to get the value located there. Hope this helps.
EDIT: I don't know how it even compiled for you. There are several errors that should occur. If you just print out x in the test function without dereferencing you will get the address not the value.