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

What is malloc calloc and realloc in c?

635


What is a program?

628


What will be the outcome of the following conditional statement if the value of variable s is 10?

729


Can we assign integer value to char in c?

595


What are register variables in c?

546






How do I use void main?

608


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1543


What is the difference between a function and a method in c?

531


What is the use of void pointer and null pointer in c language?

602


Are pointers integers in c?

586


What is modifier & how many types of modifiers available in c?

578


Can a pointer be static?

595


What is difference between main and void main?

594


How can I generate floating-point random numbers?

573


Explain setjmp()?

627