I have done programs that print themselves on execution,but is it possible for a c program to execute itself or another c program whose path is specified??

I have done programs that print themselves on execution,but is it possible for a c program to execute itself or another c program whose path is specified??

You mean executing another program from within a program?

Yes. Want to know how?

It's operating system specific, but one general option is to use the 'system' procedure. Or, if you're using a Unixy operating system and want more control over how things are done, look at execve and its friends ('fork' followed by 'execv' will start a new process. You'd have to understand how these work, which you can do by, um, reading documentation). (If you're looking at a Windows operating system, you can find documentation on its API online somewhere too.)

thanks.. the system fuction sugeested does the job I needed