B.Tech., III Semester
Examination, November 2022
Grading System (GS)
Max Marks:
70 | Time: 3 Hours
Note:
i) Answer any five questions.
ii) All questions carry equal marks.
a) Compare Object oriented and Procedure programming in detail. (Unit 1)
b) Describe the Loop and Arrays in C++. (Unit 1)
a) Write a C++ program to show the concept of class, object and calculate the area of rectangle, square and circle by using function overloading. Define scope and life of any variable. (Unit 2)
b) Write a C++ program to prepare the mark sheet of an university examination with the following items from the keyboard:
Name of the student
Roll No.
Subject name
Subject code
Internal marks
External marks
Design a base class consisting of data members Name of the student and Roll No. The derived class consists of the data members subject name, subject code, internal marks and external marks. (Unit 3)
a) What do you mean by Operator overloading? How unary and binary operators are implemented using the member and friend functions? (Unit 3)
b) Describe the multiple inheritances with example. When do we use such an inheritance? (Unit 3)
a) What is Virtual function? Explain with suitable example. (Unit 4)
b) Describe dynamic memory allocation in C++ with suitable example. (Unit 4)
a) Explain the concept of virtual function, friend function and static function by writing its syntax. Also discuss the role of 'Virtual function' and 'Abstract class'. (Unit 4)
b) What is Dynamic initialization of objects? Why is it needed? How is it accomplished in C++? Illustrate. (Unit 2)
a) Explain Virtual function and write its purpose. (Unit 4)
b) Describe the concept constructor and destructor. Write the importance of constructor and destructor. (Unit 2)
a) Explain in detail about Exception and how they handled? Define Function template and Class template. (Unit 5)
b) Discuss the term 'Polymorphism' in detail. What are the different ways to implement polymorphism in C++? Explain them in brief. Differentiate between compile time and run time polymorphism. (Unit 2)
Write short note on:
i) Disk file I/O with stream (Unit 5)
ii) Static function (Unit 4)
iii) Runtime polymorphism (Unit 2)
iv) Data hiding (Unit 2)