University Of Peshawar Computer Science (Part-II) Paper-C 2005 Time: 3 hrs
Maximum Marks: 25
Note: Attempt any FIVE questions selecting TWO questions from section-A and three from section-B. All questions carry equal marks. SECTION-A Q1. a). b).
Q2. Q3. Q4.
What is Data? Information? Discuss Information V.S Database. What is Entity? Draw ER-Model for the following relations. Student (Roll No, Name, Fname) Subject (Code, Name, Abr) Std-Subject (Roll No, Code, Marks) What is Key? Write short note on the Role of Key in relational Database. Discuss the following keys. (i) Alternate Key (ii) Composite Key (iii) Unique Key What is integrity Constraint, Domain constraint, Referential Integrity Constraint and Self Referential Integrity Constraint? Write short note on any TWO of the following. (i). SQL (ii) Concurrency Control (iii) Relational Algebra (iv) Database Security. SECTOIN-B
Q5.
Q6.
Q7.
Differentiate between. (i). Static Function VS Friend Function (ii). Function Prototype VS Function (iii) Function Overloading VS Constructor Overloading. Write C++ program using class’s concepts to input 20 into an array. The class should have the following member. (i). One data member of array of Int type (ii). One data member to store sum of array (iii). One data member to store Average of array. (iv). One member function to Calculate Sum of array. (v). One member function to display Sum & Average values. What is Constructor and Destructor. Discuss its role & types.
Q8. a).
What is meant by operator Overloading? Which types of operator cannot be overloaded? Write their names. b). What is meant by class and Object. What is the difference between them? Explain with suitable example. Q9. What is Function in C++, & member function in class? Explain with example the Virtual function. Q10. Write a short note on TWO of the following. (i). Inheritance (ii) Default Copy Constructor (iii) Scope Resolution Operator (iv) In line Function -------------------------------------------------------------