how to call dot c file using system command

Hi every one,
i have to dot pc files. One have main function but one dont have.I have to call dot pc file using system () cmd.File is being call have main function.Please let me know how i can call .pc file with two arguments from other dot pc file.I want some thing like

sprintf(buf, "ss_xxx.pc -c %s", str);
system(buf);

Please let me know what is the right way to do this.
Thanks,
goraya

I have no idea what you're trying to accomplish...but if your definition of a "dot pc file" is the same as mine, that is a Pro*C file having SQL statements in it to be pre-compiled and subsequently compiled into an executable, then you can't call it with a system call at all as it is not yet in an exectuable format.

Yes its a pro c file.I know dot pc file will have executable. can i call executable with system

sprintf(buf, ss_xxx   "agrv1" -c %s, str);
system(buf);

please let me know the syntex for sprintf(executable plus two arguments )
thankx
goraya

I think pro*c is C with extensions, so:

sprintf(buf, "stuff %s %s", string1, string2);

Here's a further example with three arguments:

sprintf(buf, "stuff %s %s %s", string1, string2, string3);

The pattern should now be apparent.

Ok...so you want to call the exectuable that was created by compiling the ProC file, NOT the ProC file itself. So...

sprintf(buf, "%s %s %s", executable_name, arg1, arg2);
system(buf);