Easy
Counting fork() output
How many times does "hello" get printed?
main.cpp
#include <unistd.h>
#include <cstdio>
int main() {
fork();
fork();
printf("hello\n");
return 0;
}1 of 53 in Operating Systems
How many times does "hello" get printed?
#include <unistd.h>
#include <cstdio>
int main() {
fork();
fork();
printf("hello\n");
return 0;
}