Skip to content
Sign upLog in
← Back to Community

i need to solve this question tree of processes(each process have to print its id and its parent id)

Profile icon
mohamadkassem

p1 given p2 and p3 and p4,p2 given p5 (this is model to solve the question
can we help me to solve in c programming

Answered by mwilki7 [earned 5 cycles]
View Answer
Voters
Profile icon
IT20260910
Profile icon
mohamadkassem
Comments
hotnewtop
Profile icon
mwilki7

printf needs format specifiers to work

printf( "%d\n", getpid() ); // 1 %d means 1 extra argument printf( "%d %d\n", getpid(), getpid() ); // 2 %d's means 2 extra arguments

%d is int
http://www.cplusplus.com/reference/cstdio/printf/

Profile icon
TannerTommy

There is not much that I can help with you here actually. Though I was very much interested in knowing about Tree Service Midlothian VA as the trees in my backyard needs a trimming. If you know about one, let me know as well.