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 / raghu
totally 8 processes...so each process will print 0 & 1
output: 0101010101010101
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is static identifier?
What is dangling pointer in c?
Write a code on reverse string and its complexity.
How does selection sort work in c?
What are qualifiers in c?
What is the use of clrscr?
What are the different types of constants?
What is array within structure?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What are header files why are they important?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
Write programs for String Reversal & Palindrome check
Why isnt any of this standardized in c?
What is the best way to comment out a section of code that contains comments?
Multiply an Integer Number by 2 Without Using Multiplication Operator