Spring 2025 - CS604 - 1
Spring 2025 - CS604 - 1
You should consult the recommended books to clarify your concepts, as handouts are
insufficient.
ASSIGNMENT SUBMISSION
You are supposed to submit your assignment in Doc or Docx format only.
Any other formats, such as scanned images, PDF, zip, rar, ppt, and BMP, will not be accepted.
You are required to send the Screenshot and C code of Question No. 1 in the same Word file.
OBJECTIVE
The objective of this assignment is to provide hands-on experience in the:
NOTE
No assignment will be accepted after the due date via email in any case (whether it is due to load
shedding or internet malfunctioning, etc.). Hence, refrain from uploading assignments within
the last hour of the deadline. It is recommended that the solution file be uploaded at least two
days before its closing date.
Please consult your instructor before the deadline if you find any mistake or confusion in the
assignment (Question statement). After the deadline, no queries will be entertained in this
regard.
Write a program for ubuntu and compile it in GNU Compiler which creates 3 child processes
from a parent process using fork(). Each child process should:
Print its process ID (PID) and parent process ID (PPID)
Execute a simple calculation (e.g., factorial of a small number)
Print your Student ID and Student Name in a line.
Print the result of factorial before exiting
The parent process should wait for all children to complete and print a summary message.
Part b)
Note: Add all the code and output screenshot in the word file only. No other file will be
accepted.