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 is null pointer in c?
what is the syallabus of computer science students in group- 1?
What are the advantages of using macro in c language?
How can I read in an object file and jump to locations in it?
What is c value paradox explain?
What is difference between && and & in c?
How do you list files in a directory?
What is the meaning of 2d in c?
What is the difference between int main and void main?
Does sprintf put null character?
Is c pass by value or reference?
Explain pointers in c programming?
What does nil mean in c?
Explain how can type-insensitive macros be created?
Explain how do you list a file’s date and time?