in reply to execution of a C program

In addition to the other good suggestions already posted in this thread, I am hoping that you didn't call the program literally test, as that's the name of a shell built-in command.

Common beginner mistake. {grin}

That's why we tell our students to always invoke their first Perl program as ./program, so that even if they should name it test, it'll still work. Plus, for security reasons, most smart people remove dot from their PATH anyway.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.