PART-I: MCS-021
Question 1: Write a program in C to determine if two binary trees are similar. Remember two Binary trees are similar if they are both empty or if they are both non-empty and left and right sub-trees are similar.(6 Marks)
Question 2: Write a program in C function, which takes the value of a pointer to the root of the tree, then computes and prints the height of the tree and a path of that length (the height of a tree is the length of the longest path in the tree from root to any leaf).(4 Marks)
PART-II: MCS-022
Question 1: (i) Write a shell script that prints a sorted list of files in the user directory that contain a user specified word inside them. User need to specify the file extension of files to be searched and the word need to be searched. (3 Marks)
(ii) What is the output of ls-lm and ls-ml? Which option takes procedure? What is the result of ls-d? (3 Marks)
Question 2: Install and Configure the DHCP Server services. Configure Windows 2000 Client to use DHCP, DNS, and WINS services. (4 Marks)
PART-III: MCS-023
Question 1: Consider the following relations and database details. Where, the regno and phone_no identify the doctor and the patient uniquely respectively.
DOCTOR (regno, name, telno, city, age)
DEPARTMENT (dept_name, head-doctor regno, no. of Doctors)
PATIENT (pname, street, city, phone_no, age)
VISIT (pname, phone_no, regno, date_of_visit, fee)
After creating the database you must perform the following tasks:
(i) Get the name and regno of physicians who are in Delhi.
(ii) Find the name and city of patient(s) who visited a doctor with regno “675374” on 31st January 2010.
(iii) Get the name of the doctors along with the total number of patients those have visited them in the month of June 2011.
(iv) Find out number of department name and its head-doctor name in which maximum number of patients had visited in year 2010.
(v) Produce a report of doctors who are going to retire within 6 months. ( Note: Age of retirement is 65 years for doctors) (10 Marks)
PART-IV: MCS-024
Question 1: Write a method in Java that reads and validates a matrix of size n x n, where n is passes as an argument to the method. A matrix is valid if and only if all diagonal entries are positive and all non diagonal entries are negative or zero. The program should print the message “The matrix is valid” if it is valid and if not print the message“The matrix is invalid”. (5 Marks)
Question 2: Design a class employee of an organisation. An employee has a name, empid, and salary. Write the default constructor, a constructor with parameters (name, empid, and salary) and methods to return name and salary. Also write a method increasesalary that raises the employee’s salary by a certain user specified percentage. Derive a subclass Manager from employee. Add an instance variable named department to the manager class. Supply a test program that uses theses classes and methods. (5 Marks)

Recent Comments