Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

finally we will get 001111.

for the first fork() two 0 will be printed and for secoond
forkk four 1 will be printed.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1194


What is meant by initialization and how we initialize a variable?

1046


Do you know what are the properties of union in c?

1078


how to capitalise first letter of each word in a given string?

1923


What is file in c preprocessor?

1145


why wipro wase

2308


Why enum is used in c?

950


What is logical error?

1119


Multiply an Integer Number by 2 Without Using Multiplication Operator

763


How is = symbol different from == symbol in c programming?

1042


What should malloc(0) do?

1115


How will you find a duplicate number in a array without negating the nos ?

2134


What is meant by gets in c?

1180


Why do some versions of toupper act strangely if given an upper-case letter?

1076


What is dynamic dispatch in c++?

1055