CS6301 Programming and Data structures II, Second year, Department of Computer Science Engineering and Information Technology, First and second Units Questions.
                                                                       Answer All Questions
Part A – (10*2=20 marks)
1.      Which is used for achieving data hiding in C++? List its types?
2.      Justify the need of static members.
3.      What is the use of this pointer?
4.      What are the applications of Object Oriented Programming?
5.      With which concept, visibility and lifetime of the variable differ in C++? List its types.
6.      What is dynamic initialization of objects?
7.      What are the special properties of virtual functions?
8.      List down the operators that cannot be overloaded.
9.      Can a parameter of copy constructor be passed by value? Justify your answer.
10.  What are the characteristics of constructor?
Part B (13*5=65 marks)
11.    (a) List the C++ programming features and explain in brief, how each of those are achieved.        (13)
(OR)
(b) How can you specify a class.Describe the different mechanisms of accessing data members and member functions in a class with    suitable example.                                                                         (13)
12.  (a)(i)Describe the types of storage classes.                                                                                         (7)
     (ii) Explain the role this pointer with a suitable program.                                                              (6)
(OR)
(b)Describe the concept Pointers, references and constant members with suitable programs.           (13)
13.  (a) List the different types of constructors. Write a program to illustrate the use of all constructors(13)
(OR)
           (b)Define String. What are the string manipulations& operations? Explain with suitable program. (13)

14.  (a) Describe the concept of Polymorphism. Explain its types with suitable programs                       (13)
                                                           (OR)
(b) Explain the concept of dynamic memory allocation, nested class, overloading through friend and = operator with example program.                                                                                                        (13)
15. (a)(i) Distinguish the term  overloading and overriding                                                               (4)
(ii) Consider base class base and derived class derived. Assume bptr is a pointer to base class and   
dptr is a pointer to derived class. Differentiate between these two pointers in terms of accessing 
the derived class object.                                                                                                        (9)
 

                                                            (OR)
               (b)Define Inheritance. Illustrate any 4 different types of inheritance with programs.                    (13)

Part C (15*1=15 marks)
16. Write a C++ program to create a base class house. There are 2 classes called door and window available. The houses class has members which provide information related to the area of construction, doors and windows detail. It delegates the responsibility of computing cost of doors and window construction to door and window classes respectively. Write a C++ program to model the above relationship and fine the cost of constructing the house.                                                                       (15)