#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(void)
{
fork();
printf("Hello");
fork();
return 0;
}
Here the code prints Hello without using '\n'
Output : HelloHelloHelloHello
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(void)
{
fork();
printf("Hello\n");
fork();
return 0;
}
Here the code prints Hello with \n Output:
Hello
Hello