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

Why main function is special give two reasons?

940


What are 3 types of structures?

590


What does return 1 means in c?

579


What is your stream meaning?

603


Are there namespaces in c?

563






What is the meaning of 2d in c?

605


Tell me is null always defined as 0(zero)?

666


what is stack , heap ,code segment,and data segment

2210


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1768


What should malloc() do?

639


Explain what will the preprocessor do for a program?

593


What is typedef example?

612


What is the ANSI C Standard?

771


What is the difference between union and anonymous union?

831


What is difference between array and structure in c?

573