A question was aked about how many A's are to be printed after running the following code in C:
int i;
for (i=1;i<4;i++){
fork();
printf("A");
}
I counted 14 on my own. However, after running it the asnwer turned out to be 24. Later I ran an altered version:
int i;
for (i=1;i<4;i++){
fork();
printf("A\n");
}
Which printed 14 A's. I'd love someone to explain this to me.