P.E.S COLLEGE OF ENGINEERING, MANDYA-571401 (An Autonomous Institution Under VTU Belgaum) Department of Master of Computer Applications Model Question Paper Data Structures Using C (P18MCA21) Credits : 4 Max. Marks : 0 Time : 3 hrs Note: Select one full question from each unit 1.a) 2.a) 3. a) 4.a) 5.a) 6.a) UNIT - I What is Abstract Data Type? Give ADT for Rational numbers with following operations: making-rational, add-rational, equality-rational Discuss different types of data types used in C Demonstrate the row-major representation of a two-dimensional array with an example. Write a C program to compute Total and Average marks to a student by taking % Subject Marks, Student name and USN UNIT - II Write algorithm for PUSH, POP and DISPLAY operations on stack. Transform each of the following expression to Prefix and Postfix expressions i) (A+B) *(C+D) $ E * F ii) (A+B) * (C $ (D-E) + F ) - G) iii) A + (((B-C) * ( D - E) + F) / G) $ ( H - J) iv) (A+B+C) / ( P - Q + R) * G v) A ^ B * (H - J * K ) + P / K * G Write a C function to evaluate postfix expression and trace for the expression (A+B)*C Write a recursive C program to search a given number using Binary search method. UNIT - III Demonstrate with a neat diagram, the working of a linear queue. Write C functions to add a node at the front, delete a node from the end and display the elements of list operations on doubly linked list. Write a C program to implement the linked stack and its operations along with exceptional conditions using SLL. Write a C program to implement the circular queue operations.
7.a) 8 a) 9. a).a) UNIT - IV Define Indexed sequential search. Create a table and search for a record in the table using the same. What are hashing? How collision are resolved in hashing. Construct a Binary Search Tree for given numbers and carryout Inorder, Preorder and Postorder traversals What is AVL tree? Explain its operations. UNIT - V Write a C program to sort N umbers using bubble sort method. Write C functions to sort numbers using Quick sort and Merge sort methods. Write a C program to sort numbers using Shell sort method. Write a C functions using Selection Sort **********************
P.E.S COLLEGE OF ENGINEERING, MANDYA-571401 (An Autonomous Institution Under VTU Belgaum) Department of Master of Computer Applications Model Question Paper Object Oriented Programming using C++ (P18MCA22) Credits : 04 Max. Marks : 0 Time : 3 hrs Note: Select one full question from each unit Unit I 1 a) Explain the important features of OOPS Write the general structure of c++ program with an example 05 c) Write a short note on reference variables 05 2 a) Explain the methods of argument passing with an example program What is function overloading? Explain with an example program. Unit II 3 a) Explian different access specifiers supported by c++ Explain static data members and static member functions of a class 4 a) What is a constructor? Explain different types of constructor with an example each. Write a c++ program to generate Fibonacci series using copy constructor 06 c) List the uses of scope resolution operator. 04 Unit III 5 a) Explain the characteristics of friend function 05 List any five rules for overloading operators 05 c) Write a c++ program to perform addition of 2 complex numbers by overloading + operator. 6 a) Write a c ++ program to overload unary + operator Write a c++ program to create a template function for bubble sort and demonstrate sorting of integers and doubles Unit IV 7 a) What is inheritance? Explain different types of inheritance with an example Explain the following with their characteristics i) Virtual functions ii) Pure virtual functions
8 a) Explain how to pass parameters to base class constructor through derived class. write a c++ program to demonstrate the same Write a c++ program to create a class STUDENT with data members USN, name and age. Using inheritance, create the classes UGSTUDENT and PGSTUDENT having fields as semester, fees and stipend. Find the semester wise average age for all UG and PG students separately. Unit V 9 a) What are iostream? Explain the stream class hierarchy with the neat diagram Explain different manipulators supplied by C++ a) Define exception. Explain try, throw and catch constructs in c++ With an example, explain container and vectors ******************
P.E.S COLLEGE OF ENGINEERING, MANDYA-571401 (An Autonomous Institution Under VTU Belgaum) Department of Master of Computer Applications Model Question Paper Operating Systems (P18MCA23) Credits : 4 Max. Marks : 0 Time : 3 hrs Note: Selecte one full question from each unit Unit-1 1. a. Discuss the activities connected with process management, memory management and file management. 6 b. List and Explain Operating System Sevices. 8 c. Explain Vmware architecture with figure 6 2. a. Describe Multiprogramming and Dual-Mode operation 12 b. Name different catgories of System Programs 4 c. Compare simple structure of operating system with layered approach 4 Unit-2 3. a. With diagram explain different state of process 6 b. List and Explain challenges in programming for multicore system c. What is Processor Affinity? Compare soft affinity and hard affinity 4 4. a. Explain different types of Schedulers 8 b. Consider the following set of process with the length of CPU-burst time Given in milli seconds. Process Burst time Priority P1 8 3 P2 1 1 P3 2 3 P4 1 4 P5 4 2 The above processes are arrived at time 0. Draw Gantt chart illustrating the execution of the above processing using FCFS, SJF, non-preemptive priority (a smaller number implies higher priority) and Round Robin (quantum=2) scheduling. Calculate average waiting time and turn around time for each of the above scheduling. Algorithms. 12 Unit-3 5. a. What are Semaphores? Explain its two Primitive operations 6 b. Write safety algorithm. 4 c. Consider the following snapshot of system: Process Allocation Max Available A B C D A B C D A B C D P0 0 0 1 2 0 0 1 2 1 5 2 0 P1 1 0 0 0 1 7 5 0 P2 1 3 5 4 2 3 5 6 P3 0 6 3 2 0 6 5 2 P4 0 0 1 4 0 6 5 6
Answer the following question using Bankers algorithm; i) What is the content of the need matrix ii) Is the system in a safe state? 6. a. List Classic Problems of Synchronization and explain any one 8 b. Discuss Deadlock Prevention 12 Unit-4 7. a. With respect to Memory Management, Define i) First fit ii) Best fit and iii) Worst fit Algorithms 6 b. Explain paging hardware with translation look aside buffer. 8 c. Compare Page Replacement Algorithms 6 8. a. Differentiate between Paging and Segmentation. 4 b. What do you mean by fragmentation? List out the differences between Internal and External fragmentation. 6 c. What is page fault? What actions does the operating system take when a page f ault occurs explain? Unit-5 9. a. Describe any two different allocation methods with respect to file systems b. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 37,122,14,124,65,67 In that order. If the disk head is initially at cylinder 53, find the number of head Movements using the following algorithms i) FCFS ii) SSTF.. a. What is a file? Explain different file attributes and various operations on a file that could be performed. b. Discuss Two-Level and Tree-Structured Directories *************
P.E.S COLLEGE OF ENGINEERING, MANDYA-571401 (An Autonomous Institution Under VTU Belgaum) Department of Master of Computer Applications Model Question Paper Database Management Systems (P18MCA24) Credits : 04 Max. Marks : 0 Time : 3 hrs Note: Select one full question from each unit UNIT - I 1. a) Explain the advantages of using a Database Management System. What is meant by Data Independence? Explain briefly different Types of it. 06 c) Briefly explain, when not to use a DBMS? 04. 2. a) Explain the component modules of DBMS and their interactions with the help of a diagram. Explain Three Schema architecture. 05 c) Explain the Client Server architecture. 05 UNIT - II 3. a) Define the steps for following terms with an example with respect to an ER model. i) Entity Set ii) Relationship Instance iii) Cardinality Ratio iv) Participation v) Weak entity set Explain the different types of symbols used in the ER diagram. 4. a) Construct an ER diagram for COMPANY database. The company keeps track of company s employees, project, department. A department controls a number of projects and employee can work for any number of projects. The company keeps track of dependents of each employee for insurance company. For the ER diagram develop the relational database scheme. Briefly explain the different types of attributes occur in ER model. UNIT - III 5. a) Explain the following relational algebra operations: i) SELECT ii) PROJECT iii) Cartesian product iv) Union v) Set difference. Describe left outer join, Right outer join and full outer join with examples.
6. a) Consider the following relational schema and answer the following queries using relational algebra. EMP (Name, SSN, Bdate, Address, Sex, Salary, SSSN, DNO) Department (Dname, DNO, MSSN, Msdate) Dept-Ioc (DNO, DLOC), Project (Pname, Pno, PLOC, DNO) Works - ON (ESSN, PNO, HOURS) Dependent (ESSN, Dname, Sex, Bdate, relationship) i) Retrieve the names of all Employees in dno = 5 who work more than hrs/week on product 'X' project. ii) For each department retrieve the department name, and the average salary of all the Employees working in that department. iii) List the names of all department managers who have no dependents. iv) Retrieve the average salary of all female Employees. Explain the ER to relational mapping algorithm. UNIT-IV 7. a) Explain all options of SELECT statement in SQL.Give example for each. Briefly explain the different domain types used in SQL. 04 c) Explain ON DELETE CASCADE, ON UPDATE CASCADE and 06 CHECK clauses. 8. a) Consider the following relations S(SNo, Sname, status, city) P(PNo, Pname, colour, weight, city) SP(SNo, PNO, Qty). Solve the following queries in SQL. i) Get PNO for parts, which have more than two shipments. ii) Get SNO for suppliers who supply at least one part supplied by S2. iii) Retrieve the details of shipments whose quantity is known. iv) Retrieve all the parts cities and supplier cities. v) Create a view to select part name, color and Quantity supplied by the supplier 0. Explain the following with suitable examples i) Views in SQL ii) Describe Aggregate functions in SQL. UNIT- V 9. a) What is functional dependency? Give Armstrong Inferences rules for functional dependencies. Define normalization. Explain 1NF, 2NF and 3NF with suitable examples.. a) Discuss ACID properties of database transaction. Describe locking techniques for concurrency control. ********