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:(2x10=20)
Write a program according to the specification given below:
What is meant by type conversion? Define two way of converting one user defined data type (object) to another user defined object? Write a program that converts object of another distance class with data members feet and inch.(Assume 1m = 3.3 feet and 1cm = 0.4 inch)
How ambiguity arises in multipath inheritance? How can you remove this type of ambiguity? Explain with suitable example.
Attempt any Eight questions:(8x5=40)
What is structured programming? Discuss characteristics and problems associated with structured programming.
What is the use of get and getline functions? Explain with suitable example.
What is meant by pass by reference? How can we pass arguments by reference by using reference variable? Illustrate with example.
What is constructor? Explain the concept of default and default copy with suitable example.
What is the concept of friend function? How it violates the data hiding principle? Justify with example.
What is exception? Why exception handling is better to use? Explain exception handling with try….. catch by using suitable example.
When class templates are useful? How can you define a class that can implement stack with integer as well as sack of strings? Illustrate with example.
What is meant by stream? Write a program that reads content of file data.txt and displays the content in monitor.
Write short notes on: