Institute of Science and Technology
Bachelor Level / second-semester / Science
Computer Science and Information Technology( CSC161 )
Full Marks: 60 + 20 + 20
Pass Marks: 24 + 8 + 8
Time: 3 Hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.
Attempt any TWO questions (2 x 10 = 20)
What is aggregation? Write a program for implementing following:
Create a class author with attributes name and qualification. Also create a class publication with pname. From these classes derive a classes derive a class book having attributes title and price. Each of the three classes should have getdata() method to get their data from user. The classes should have putdata() method to display the data. Create instance of the class book in main.
What is operator overloading? Why it is necessary to overload an operator? Write a program for overloading comparision operator.
What is the use of constructor and destructor? Write a program for illustrating default constructor, parameterized constructor and copy constructor.
Attempt any EIGHT questions (2 x 10 = 20)
Describe the characteristics of object oriented programming language
Define class and object with suitable example. How members of class can be accessed?
What is inline function? Why it is used? Write a program to illustrate inline function.
What are the various class access specifiers? How public inheritance differs from private inheritance?
Write a program to implement function template with multiple arguments.
Write a program to illustrate the use of seekg() and tellg().
How dynamic memory allocation is done using new and delete? Write a program for illustrating use of new and delete.
Write short notes on: