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

In C programming, how do you insert quote characters (‘ and “) into the output screen?

1197


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

876


What is the difference between far and near in c?

779


Explain how do you determine a file’s attributes?

783


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

4783






Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

772


Explain the difference between the local variable and global variable in c?

803


Why array is used in c?

740


How do we make a global variable accessible across files? Explain the extern keyword?

1606


Explain what is the difference between a string and an array?

868


How can I find the modification date of a file?

906


What is #line in c?

737


Why does the call char scanf work?

843


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1722


In C language, a variable name cannot contain?

976