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 / vignesh1988i
for first printf it will print 0, for second printf it will
print 1.. and finally i will have a value 2.
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
what are # pragma staments?
Are comments included during the compilation stage and placed in the EXE file as well?
Why is c still so popular?
How macro execution is faster than function ?
What is meant by recursion?
what is ur strangth & weekness
How can I insert or delete a line (or record) in the middle of a file?
What are reserved words?
What are static variables in c?
Write a program to know whether the input number is an armstrong number.
What is a 'null pointer assignment' error?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
What is malloc return c?