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
Dont ansi function prototypes render lint obsolete?
Can variables be declared anywhere in c?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
number of times a digit is present in a number
How can you avoid including a header more than once?
I have a varargs function which accepts a float parameter?
Write a program to print fibonacci series without using recursion?
Write a program to print fibonacci series using recursion?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
write a program to print largest number of each row of a 2D array
What is spaghetti programming?
What is an operator?
Tell me what are bitwise shift operators?
What is variable declaration and definition in c?
What is difference between %d and %i in c?