Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  my program
Language: C/C++
Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
     int pid,status;
     pid=fork();
     if(pid==0)
     {
          printf("C1\n");
          execlp("date","date",'\0');
          printf("C2\n")
          exit(0);
     }
     else
     {
          wait(&status);
          printf("P1\n");
          printf("P2\n");
}
return 0;
}
          
Comments: