Operating Systems
Lab #1
Objective of this lab Is to refresh C programming basics and Linux usage. The instructor will go through some slides and
demonstrations to explain different activities including program write up, compilation and execution. Then you will be required to
complete different tasks as given below.
You can consult any online material for help, Particularly useful will be the following:
http://pages.cs.wise,edu/~rem2i/OSTEP/lab tutorial
Tasks
Ti: Write, Compile and Execute a C program that prints the table of a number given as command line argument.
Ta: Write C program that displays all the arguments passe¢ to it through command line.
TB: Write, Compile and Execute a C program with following requirements
Ithas 3 source files (main.c, mulA.c, mul6.c)
rmain.c has main function which caleulates a given number multiply by 4 and then multiply by 6 by calling functions defined
in mula.c and mul6.c
‘mule defines a function which takes an integer number as argument and returns multiply by 4 oft
rmul6.c defines a function which takes an integer number as argument and returns multiply by 6 oft
4: Change the previous task such that mul4.c and mul6.c now use power function. Le., they return power of 4 and power of 6
instead of multiplication. Recompile and execute the program.
You do not need to submit any thing. All the working against every task should be shown to the instructor within lab.