We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

CS-604 Assignment No#1 Due Date: 12-05-2016 .................... from 1st to 7th lectures..

Assignment Objective:

  • To give you hand on experience of Ubuntu though VMware
  • To know about system calls like fork, wait, and exec
  • How to work on Ubuntu terminal
  • How to compile a program using gcc compiler and execute a program through terminal

Uploading instructions:

  • Your assignment must be in .doc format (Any other formats like scan images, PDF, bmp, etc will not be accepted).
  • Save your assignment with your ID (e.g. bc020200786.doc).
  • No assignment will be accepted through email.

Rules for Marking:


It should be clear that your assignment will not get any credit if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupted.
  • Your assignment is copied from internet, handouts or from any other student

      (Strict disciplinary action will be taken in this case).



Write a C program in any editor of Linux in which you have to create one child using fork system call. In child process, message will be displayed to take input for two tasks through Switch or If else statements.


  • One for execution of ping command for any website i.e ping yahoo.com using the execlp() system call.
  • Second to create any directory using mkdir command i.e mkdir VU


Parent process should wait until child finishes its execution through Wait() call and display a message “Well done Kid”.

Finally Both Parent and Child ID should be displayed.


You have to solve the assignment in the following way


  • Save the program in your student id directory which can be created anywhere i.e Desktop
  • Attach only two screen shots i.e one for ping and other for mkdir
  • Also copy the code in the text format in the same word file in which screen shot attached.


Sample Program output:

Screen Shot 1:

Screen Shot 2:

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 23260


Replies to This Discussion

please make assignment for me. i m unable to download and configuration for unbuntu..

my id: mc120404122

koi hai jo thori help kr dy meri??

Done & Submitted

do you like to help me....

main ni jb ubunto instal kea kr kopen kia to ye dilogbox aia


if(execlp("/bin/ping", "ping", "-c 4", "www.google.com", NULL)< 0);

mujy ic line ki samj nahi aa rahi how to create ping please koi help ker dy

book mein ye code assy hai 

if(execlp("/bin/ls", "ls", NULL)< 0);

ab ic mein LS ka kya system hai ore yahan ik bhai ne jo code likha hai us mein ping be hai

watch this video easy step for installation and run for code. with urdu audio

plz ubunt ko download karne ka correct link bata dein. for 32 bit system. bohat dafa try kia but fail pllz help. vm insatll ho geya he. ubunt nahi ho raha.   give link

check my video link maine wahan diya howa hai

bro her code mai error araha. can u please help me?


Looking For Something? Search Here


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service