Answers for "fork example"

0

fork example

#include <stdio.h> 
#include <sys/types.h> 
#include <unistd.h> 
int main() 
{ 
    /* fork a process */
    fork(); 
    /* the child and parent will execute every line of code after the fork (each separately)*/
    printf("Hello world!!!n"); 
    return 0; 
}
Posted by: Guest on February-19-2022

Browse Popular Code Answers by Language