#include"myHeader.h" main() { int a=10; if(fork()) { printf("%d ",a); pause(); } else { printf("%d ",a++); printf("%d ",a); } }OutPut:
madan@madan-Lenovo-G570:~/madan/osconcepts$ cc ex17.c madan@madan-Lenovo-G570:~/madan/osconcepts$ ./a.out 10 11
#include"myHeader.h" main() { int a=10; if(fork()) { printf("%d ",a); pause(); } else { printf("%d ",a++); printf("%d ",a); } }OutPut:
madan@madan-Lenovo-G570:~/madan/osconcepts$ cc ex17.c madan@madan-Lenovo-G570:~/madan/osconcepts$ ./a.out 10 11