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

for first printf it will print 0, for second printf it will
print 1.. and finally i will have a value 2.

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null pointer in c?

988


what is the syallabus of computer science students in group- 1?

2316


What are the advantages of using macro in c language?

1123


How can I read in an object file and jump to locations in it?

1027


What is c value paradox explain?

1088


What is difference between && and & in c?

1104


How do you list files in a directory?

1140


What is the meaning of 2d in c?

1123


What is the difference between int main and void main?

1045


Does sprintf put null character?

1039


Is c pass by value or reference?

1033


Explain pointers in c programming?

1110


What does nil mean in c?

1249


Explain how can type-insensitive macros be created?

989


Explain how do you list a file’s date and time?

1035