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 header file in c?

1068


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2686


Multiply an Integer Number by 2 Without Using Multiplication Operator

763


How many bytes is a struct in c?

1164


Why does everyone say not to use gets?

1100


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

1103


Explain how can I read and write comma-delimited text?

1159


What are the string functions? List some string functions available in c.

991


Why is c still so popular?

1042


Explain how do you override a defined macro?

1073


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2351


When should the const modifier be used?

1105


What is function prototype in c language?

1031


What is signed and unsigned?

1056


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1121