script in c
£10-20 GBP
Dibayar saat pengiriman
1. Calculate the Volume of a Cuboid
Write and comment a program called volumeofcuboid.c that calculates the volume of a cuboid given the following formula:
Volume = Height × Width × Depth
Height, Width and Depth will be entered from the keyboard by the user.
Compile the program volumeofcuboid.c to form an executable program called volumeofcuboid.
2. Swap
Write and comment a program called swap.c which makes use of a file called swap.h that contains one single function with behaviour and prototype as follows:
/* sets the variable referenced by s to zero and returns the previous value of s */
int swap(int *s);
Your program should #include “swap.h” containing the above function. swap.c should contain several tests of the function.
Compile the program swap.c to form an executable program called swap.
3. List It
Write and comment a program called listit.c which takes a command line parameter of either “a” or “b” or “c” or “abc”. The program should give a file and directory listing of the current working directory and based on the command line parameter received do the following:
“a” - use a long listing format do not hide entries starting with .
“b” - do not hide entries starting with .
“c” - use a long listing format and print sizes in human readable format
“abc” – do all of the above
Compile the program listit.c to form an executable program called listit.
ID Proyek: #4876316
Tentang proyek
Diberikan kepada:
3 freelancer rata-rata menawar £19 untuk pekerjaan ini
Hi I am an experienced software developer , having worked for Cisco , and Texas Instruments for over 1.5 years. I am proficient in C , C+, C# and Java , I can do this job you very easily. Hoping to hear from you so Lebih banyak