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

0101010101

Is This Answer Correct ?    3 Yes 6 No






Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

62


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

1112


Is it possible to initialize a variable at the time it was declared?

86


What are the types of functions in c?

27


Why isnt any of this standardized in c?

86






What is structure data type in c?

32


What is function definition in c?

41


Write the control statements in C language

85


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1134


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

1287


What math functions are available for integers? For floating point?

73


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

991


What is the function of volatile in c language?

65


Write a program to check armstrong number in c?

59


What is difference between main and void main?

45