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 are the different types of objects used in c?

988


What are the modifiers available in c programming language?

1186


What is a global variable in c?

972


What is typedef example?

1133


What is a wrapper function in c?

1085


What is the difference between abs() and fabs() functions?

1078


What is keyword in c?

974


Explain About fork()?

1071


given post order,in order construct the corresponding binary tree

2752


What is 'bus error'?

1113


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1171


What is the difference between functions abs() and fabs()?

1112


What is the difference between the local variable and global variable in c?

941


What are the 5 data types?

1078


What are the disadvantages of external storage class?

1021