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

totally 8 processes...so each process will print 0 & 1
output: 0101010101010101

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c definition?

1339


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

1092


What is derived datatype in c?

1145


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1305


What is the use of bit field?

1235


How can you return multiple values from a function?

1167


Can 'this' pointer by used in the constructor?

1133


What is your stream meaning?

1336


What do you mean by Recursion Function?

1178


Can I initialize unions?

1091


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

2222


write a program to print largest number of each row of a 2D array

2372


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1133


What are the storage classes in C?

1203


What is scope of variable in c?

1089