Computer Engineering (Semester 3)
Total marks: 80
Total time: 3 Hours
INSTRUCTIONS
(1) Question 1 is compulsory.
(2) Attempt any three from the remaining questions.
(3) Draw neat diagrams wherever necessary.
1.a. Explain friend function with example.
(4 marks)
00
1.b. Consider the following declaration :
class TRAIN
{
int trainno;
char dest[20];
float distance;
public:
void get( );//To read an object from the keyboard
void put( );//To write an object into a file
void show( )//To display the file contents on the monitor
};
Complete the member functions definitions
(8 marks)
00
Or
2.a. List the features of Object-oriented programming.
(3 marks)
00
2.b. What is Pointer, Smart Pointer and Shared Pointer. Explain using
diagram and program.
(9 marks)
00
3.a. What is exceptional handling?
(3 marks)
00
3.b. Explain :
(i) Virtual base class
(ii) Abstract Class
(4 marks)
00
3.c. What is generic programming? How is it implemented in C++?
(5 marks)
00
Or
4.a. Explain class template using multiple parameters. Write a program
in C++.
(8 marks)
00
4.b. Explain the significance of static keyword in programming.
(4 marks)
00
5.a. Write the C++ file input and output program using seekg( ), tellg( ), read( )
etc member function.
(7 marks)
00
5.b. What are cin and cout? Explain iostream.
(6 marks)
00
Or
6.a. What are various functions which are used to manipulate file pointers?
Explain using examples.
(7 marks)
00
6.b. Explain command line arguments in C++. Write program to explain the same.
(6 marks)
00
7.a. Use minimum 8 functions of vector STL. Write a program to explain the same.
(7 marks)
00
7.b. What is STL? List different types of STL containers.
(6 marks)
00
Or
8.a. Write a program to implemented Map using STL.
(6 marks)
00
8.b. What is a container? List the container classes in C++. Explain any one of them using program.
(7 marks)
00