You can't see the processes because they finished when you issued ps:
[3] Exit 1 test
My c knowledge is maybe a bit rusted, but you keep using the cpu all the time with your infinite loops and may have hit some limitation which caused your processes to abort. Maybe use sleep inside your loops to avoid overusing the cpu?
I think the problem is much simpler than you might think. Your choice of name for your code ( test ) is the name of a shell built-in in most shells and the name of a utility probably located in /bin or /usr/bin on your system and, therefore, likely will be found in your search path before a utility named test located in your current working directory.
You will probably see exactly what you were expecting to see (two copies of your test utility running) if you invoke it with: