Course Title : Introduction to Software

Assignment Number : MCA(1)-02/TMA/08

Maximum Marks : 10

Last Date of Submission : 15th April, 2008

This is a Tutor Marked Assignment. There are five questions in this assignment. Answer all the questions. You may use illustrations and diagrams to enhance explanations.

Question 1: Write an algorithm/program that accepts an input a decimal number and converts it into octal representation.

Question 2: Give the complete specifications for the passes of a two-pass assembler indicating:
Tables for internal use of the passes
Tables to be shared between passes
Inputs (files and tables) for every pass
Outputs (files and tables) of every pass
You must specify why certain information is in the form of tables in main memory while other information is in the form of files. Also recommend appropriate organizations for the tables and files used in the two-pass assembler.

Question 3: Compare and contrast the features of UNIX with WINDOWS VISTA operating system.

Question 4: Write the UNIX commands for the following:
(a) Use the more command, and a pipe to send the contents of your .profile and .shrc files to the screen.
(b) How could you use head and tail in a pipeline to display lines 25 through 75 of a file?
(c) To search the /etc/passwd file for the lines containing any input string given by the user.
(d) To see the lines in /etc/passwd that begins with the character “a”.
(e) List all the files in the /tmp directory owned by the user root.
(f) To see a complete listing of all the processes currently scheduled.
(g) Use the ps command, and the grep command, in a pipeline to find all the processes owned by you.
(h) To force termination of a job whose process ID is given.
(i) Sort the /etc/passwd file, place the results in a file called foo, and trap any errors in a file called err with the command.
(j) To sort a file called foo, and place the results in a file called bar.