0
348views
Object Oriented Programming Question Paper - Dec 18 - Computer Engineering (Semester 3) - Pune University (PU)
1 Answer
0
0views

Object Oriented Programming - Dec 18

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. What is dynamic memory allocation ? Explain its use in C++ with a suitable example.
(6 marks) 00

1.b. What are primitive data types and User defined data types ?
(3 marks) 00

1.c. What are inline functions ? What are their advantages ?
(3 marks) 00

Or

2.a. Explain the use of explicit and mutable keywords with suitable examples (hint : explicit is used with constructor and mutable is used with data member declaration).
(6 marks) 00

2.b. Differentiate between compile time polymorphism and run time polymorphism.
(6 marks) 00

3.a. Write a template function that returns the average of all the elements of an array. The arguments to the function should be the array name and the size of the array (type int). In main( ), Exercise the function with arrays of type int, long, double and char.
(5 marks) 00

3.b. how function overloading and function templates are related to each other ? State valid example to justify your answer.
(4 marks) 00

3.c. What are friend functions and static functions ?
(4 marks) 00

Or

4.a. create a user defined exception to check whether your employee exist in your data structure (use any data structure to store the employees) and throw exception if name is not in the employees list. Use the catch block to print an appropriate message on the screen.
(5 marks) 00

4.b. Explain various arithmetic pointer operations.
(4 marks) 00

4.c. What is generic programming ? How is it implemented in C++ ?
(4 marks) 00

5.a. rite a program that returns the size in bytes of a program entered on the command line : 8 filesize program.txt
(6 marks) 00

5.b. Write a program to create a file, read and write the record into it. Every record contains Employee Name, Id, and Salary. Store and retrieve at least 3 employee data.
(6 marks) 00

Or

6.a. a) Explain the following file handling functions : I. open( ) II. get( ) III. getline( ) IV. seekg( ) V. tellg( )
(10 marks) 00

6.b. What is a Stream ? Explain types of Streams available in C++.
(3 marks) 00

7.a. State functions of vector STL. Write a program to explain the same.
(6 marks) 00

7.b. Elaborate advantages and disadvantages of the following Basic Sequence Containers : [6] (a) Vector (b) List.
(6 marks) 00

Or

8.a. Write a program to implement Map using STL.
(6 marks) 00

8.b. What is the STL ? Why should a C++ programmer be interested in the STL ? What is the design philosophy of the STL ? What are the major components of the STL ?
(6 marks) 00

Please log in to add an answer.