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 / vignesh1988i

01 finally i will have 2

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is break in c?

587


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2055


How can this be legal c?

651


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

1629


program for reversing a selected line word by word when multiple lines are given without using strrev

1947






hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1673


Explain the difference between null pointer and void pointer.

671


What happens if a header file is included twice?

598


What is pointer and structure in c?

574


What is the value of h?

593


What are terms in math?

594


What are the back slash character constants or escape sequence charactersavailable in c?

686


What are structure types in C?

669


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

658


what is event driven software and what is procedural driven software?

2016