someone please help me on how to run this coding using knoppix linux.. using c language.. i really need help.. i want to know.. what is the output.. this is the coding :-
int main()
{
Pid_t pid;
/* fork another process */
pid=fork();
if (pid<0)
{
/* error occured */
fprintf (stderr,"fork failed");
exit(-1);
}
else if (pid==0)
{
/* child process */
execlp("/bin/ls","ls",NULL);
}
else
{
/* parent process */
/* parent will wait for child to complete */
wait (NULL);
printf ("Child Complete");
exit(0);
}
}
-please, i need your help