What is the output of the following program

#include<stdio.h>
main()
{
int i=0;
fork();
printf("%d",i++);
fork();
printf("%d",i++);
fork();
wait();
}

Answer Posted / vijay r15

error undefined
function fork and wait

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is a house a shell structure?

686


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1891


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15026


Why ca not I do something like this?

580


What is pre-emptive data structure and explain it with example?

3197






what are the facialities provided by you after the selection of the student.

1647


Differentiate between the expression “++a” and “a++”?

687


Is fortran faster than c?

568


Is stack a keyword in c?

624


Explain the difference between the local variable and global variable in c?

587


Explain zero based addressing.

595


What are predefined functions in c?

555


When is a void pointer used?

669


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

647


What is the use of #include in c?

566