logo

Crowdly

Predict the output of the program given here. Assume that there is no mixing o...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Predict the output of the program given here.

Assume that there is no mixing of printf output on screen if two of them run concurrently.

In the answer replace a new line by a single space.

For example::

good

output

should be written as good output

--

int main() {

  int pid;

  printf("hi\n");

  pid = fork();

  if(pid == 0) {

    exit(0);

  }

  printf("bye\n");

  fork();

  printf("ok\n");

}

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.coep.org.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!