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

What is spark map function?

1056


How are pointers declared in c?

1001


What is %g in c?

1017


Is c dynamically typed?

1088


What is the modulus operator?

1148


Explain what are header files and explain what are its uses in c programming?

1108


What are 'near' and 'far' pointers?

982


What is the use of define in c?

998


i want to know the procedure of qualcomm for getting a job through offcampus

2409


Is main a keyword in c?

1082


What are local static variables? How can you use them?

1080


Can you write the algorithm for Queue?

2026


Can you pass an entire structure to functions?

1076


How is a structure member accessed?

1057


What are extern variables in c?

945