I want to run file test2.c from the file test1.c .But it is not happening so?Any mistake?
You are passing in the arguments incorrectly.
Assuming that your executable image is called "test2", try this:
int j=execl("/home/ishan/os/test2", "/home/ishan/os/test2", (char*)NULL);
argvto the new process. Conventionally, this is also the complete path to the target executable.