Skip to content
Sign upLog in

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

Profile icon

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

You are viewing a single comment. View All
Profile icon

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