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 / sourisengupta
finally we will get 001111.
for the first fork() two 0 will be printed and for secoond
forkk four 1 will be printed.
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Disadvantages of C language.
Can we replace the struct function in tree syntax with a union?
What do you mean by dynamic memory allocation in c? What functions are used?
Why is structure important for a child?
How do you list a file’s date and time?
Is main an identifier in c?
What is fflush() function?
What is the use of typedef in c?
What are identifiers c?
What are examples of structures?
What are header files in c programming?
How can you tell whether a program was compiled using c versus c++?
i want to know the procedure of qualcomm for getting a job through offcampus
Explain how can I convert a number to a string?
When should structures be passed by values or by references?