Write a program to implement singly linked list for integers (user input) and perform the following operations on it:
(i) Count and display the number of even and odd numbers of integer nodes separately.
(ii) Sort the nodes in ascending order and display them.
See Answer →Write a program in 'C' Language to accept a string as input and print them in reverse order. Do not use any inbuilt string related functions.
See Answer →Write a program to take input of two matrices from user using arrays. Multiply both the matrices and display the resultant matrix.
See Answer →Write a program in C++ for implementation of a Doubly Linked List using pointers.
See Answer →Write a program in C++ to generate a report consisting of the names of employees who are retiring from job on a given specific input date. Make necessary assumptions.
See Answer →
What is a Virtual Base Class? When should it be used? Explain with an example.
See Answer →What do you mean by Exception Handling? What are its advantages and disadvantages?
See Answer →
What is a Virtual Destructor? What are its advantages? Explain with examples.
See Answer →
Develop SRS for Student Admission System. SRS should be as per IEEE standard SRS template. Make necessary assumptions.
See Answer →Consider the following schedule S with two transactions T1 and T2:
S: R1(X); W1(X); R2(X); W2(X); R1(Y); W1(Y); Commit1; R2(Y); W2(Y); Commit2;
(i) Draw the precedence (serializability) graph for the schedule S.
(ii) Is the schedule S serializable? If yes, provide the equivalent serial schedule(s). If no, explain why.
iii) Identify any concurrency problems (e.g., Lost Update, Dirty Read) present in this schedule. Explain how the problem occurs.
See Answer →Consider the relation R(A, B, C, D, E, F) with the following set of Functional Dependencies (FDs):
F = { A → BC, CD → E, B → D, E → A }
(i) Find all the candidate keys for the relation R.
(ii) Is the relation R in 3NF? Justify your answer.
(iii) Decompose the relation R into a set of relations that are in BCNF.
See Answer →Write and execute SQL queries for the following tasks. Make suitable assumptions where necessary.
(a) Create the Employees table with EmpID as the primary key and DeptID as a foreign key referencing the Departments table. The Salary should not be negative. (4 Marks)
(b) List the names and salaries of all employees working in the 'Technology' department, sorted in descending order of their salary.
(c) Find the name of each department and the number of employees working in it. Display only those departments that have more than 10 employees.
(d) Find the names of all employees whose salary is greater than the average salary of all employees in the company.
(e) List the names of all projects along with the name of the employee who is leading the project.
See Answer →Consider the following relational schemas for a company database:
- Employees (EmpID, EmpName, Salary, DeptID)
- Departments (DeptID, DeptName)
- Projects (ProjID, ProjName, Lead_EmpID)
Convert the ER diagram from part (a) into a set of relational schemas (tables). You must underline the primary key for each table and clearly indicate all foreign keys and the tables they reference.
See Answer →Design a complete ER (Entity-Relationship) diagram for the "EduSphere" platform. Clearly show all entities, attributes (including primary keys), relationships, and their cardinality constraints.
See Answer →An online learning platform, "EduSphere," needs a database to manage its operations. The requirements are as follows:
- The platform has many Students. Each student is identified by a unique StudentID and has a Name, Email, and RegistrationDate.
- The platform features several Instructors. Each instructor has a unique InstructorID, Name, and a short Bio.
- There are multiple Courses on offer. Each course has a unique CourseID, a Title, Duration (in hours), and a Fee.
- An instructor can teach multiple courses, but each course is taught by only one instructor.
- A student can enroll in multiple courses, and a course can have many students. When a student enrolls, the EnrollmentDate and the final Grade obtained are recorded.
Explain the difference between 3NF (Third Normal Form) and BCNF (Boyce-Codd Normal Form). Provide an example of a relation that is in 3NF but not in BCNF.
See Answer →