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 the different types of objects used in c?
What are the modifiers available in c programming language?
What is a global variable in c?
What is typedef example?
What is a wrapper function in c?
What is the difference between abs() and fabs() functions?
What is keyword in c?
Explain About fork()?
given post order,in order construct the corresponding binary tree
What is 'bus error'?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What is the difference between functions abs() and fabs()?
What is the difference between the local variable and global variable in c?
What are the 5 data types?
What are the disadvantages of external storage class?