This is a simple one, execute your program like this:
./test
The current directory is not in your PATH by default. There is a system utility named test which is getting executed instead of your program. The ./ tells the shell to execute the program test that is in the current directory