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

Dont ansi function prototypes render lint obsolete?

1198


Can variables be declared anywhere in c?

1149


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1736


number of times a digit is present in a number

2081


How can you avoid including a header more than once?

1024


I have a varargs function which accepts a float parameter?

1099


Write a program to print fibonacci series without using recursion?

1218


Write a program to print fibonacci series using recursion?

1131


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1918


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

2372


What is spaghetti programming?

1200


What is an operator?

1128


Tell me what are bitwise shift operators?

1174


What is variable declaration and definition in c?

969


What is difference between %d and %i in c?

1307