Code No: R15A0022 MODEL PAPER -I MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY B.Tech. I Year - II Semester Examinations OBJECT ORIENTED PROGRAMMING (Common to ECE, CSE, IT, MECH, ANE, Mining) R15 Time: 3 hours Max. Marks: 75 Note: This question paper contains two parts A and B Part A is compulsory which carriers 25 marks and Answer all questions. Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions, Choosing ONE Question from each SECTION and each Question carries 10 marks. 1. PART-A (25 MARKS) a) Write any three differences between oop and pop. [2M] b) What is reference variable in C++? [3M] c) Define object? [2M] d) Explain inline functions with one example? [3M] e) What is meant by copy constructor with one example? [2M] f) How to achieve code reusability in oop? [3M] g) What are dynamic memory management operators? [2M] h) Define pointer to object? [3M] i) What is meant by generic programming. [2M] j) Explain about try, catch blocks? [3M] PART-B (50 MARKS) SECTION-I 2. Explain briefly about Object Oriented Programming concepts? 3. a) Explain briefly about Operators in C++? [5+5M] b) Explain briefly about loop control statements in C++? SECTION-II 4. a)explain Function Overloading with one example program? [5+5M] b)define class? Explain how to declare class with one example program? ( OR) 5. a)how to access private members of class using non member functions with one example? [5+5M] b) How many ways to pass object as a function arguments explain with example program? SECTION-III 6. a) Define Inheritance? Explain Hierarchical Inheritance? [5+5M]
b) Explain briefly about constructor with default arguments? 7. a) Write a C++ program to perform sum of two complex numbers using binary operator over loading? [5+5M] b) Explain about constructors in derived class? SECTION- IV 8. How to achieve run time polymorphism in C++ explain with one example program? 9. a)explain briefly about this pointer? [5+5M] b) Explain briefly about pointer to derived classes? SECTION- V 10. a) Explain class templates with multiple parameters? [5+5M] b) Explain briefly about exception handling? (OR ) 11. Explain briefly about stream I/O in C++?
Code No: R15A0022 MODEL PAPER -II MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY B.Tech. I Year - II Semester Examinations OBJECT ORIENTED PROGRAMMING (Common to ECE, CSE, IT, MECH, ANE, Mining) R15 TIME: 3 HOURS MAX. MARKS: 75 NOTE: This question paper contains two parts A and B. Part A is compulsory which carriers 25 marks and Answer all questions. Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions, Choosing ONE Question from each SECTION and each Question carries 10 marks. PART-A (25 MARKS) 1. a) What are the input and output operators in C++. Give a suitable example. [2M] b) List the features of object oriented programming. [3M] c) Define a class with syntax. [2M] d) Why do we prefer inline functions? [3M] e) What is meant by operator overloading. [2M] f) Describe the terms constructor and destructor. [3M] g) What is a virtual destructor? [2M] h) Differentiate between static binding and dynamic binding. [3M] i) Describe the various file mode operations available. [2M] j) Differentiate class templates and function templates. [3M] PART-B (50MARKS) SECTION-I 2. Why object oriented programming is mostly preferred than procedure oriented. Explain. 3. List the features of object oriented programming. SECTION-II 4. Define class and object. Write a C++ program to declare a class employee, data members: emp_no, emp_name, member functions: accept() to accept, display() to display the data for 5 employees 5. Explain inline function. Illustrate C++ program for function overloading. SECTION-III 6. List the types of inheritance supported in C++. 7. List the various restrictions with operator overloading. Write a C++ program to illustrate the overloading of increment operator.
SECTION- IV 8. What is a virtual function? What are the implications of making a function a pure virtual function. 9. What is Polymorphism? How do we attain Run time Polymorphism? Write a C++ program to illustrate new and delete keywords. SECTION- V 10. What are templates? Explain class templates and function templates with examples. 11. What are file streams? Discuss about state of file, opening and closing file with a sample C program.
Code No: R15A0022 MODEL PAPER -III MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY B.Tech. I Year - II Semester Examinations OBJECT ORIENTED PROGRAMMING (Common to ECE, CSE, IT, MECH, ANE, Mining) (COMMON TO All Branches) R15 TIME: 3 HOURS MAX. MARKS: 75 NOTE: This question paper contains two parts A and B. Part A is compulsory which carriers 25 marks and Answer all questions. Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions, Choosing ONE Question from each SECTION and each Question carries 10 marks. PART-A (25 MARKS) 1. a) List the Features of Object oriented programming.. [2M] b) What is scope resolution operator? Write its uses? [3M] c) When do we declare a member of class static? Justify. [2M] d) What is the use of friend function? [3M] e) Define constructor? What are special characteristics of constructors? [2M] f) Explain copy constructor with one example? [3M] g) What is a pure virtual function? [2M] h) Differentiate between run time polymorphism and compile time polymorphism. [3M] i) Why are template functions required? Write a template function for swapping [2M] two arguments. j) What is Exception handling? What are the constructs supported by C++ to [3M] handle exceptions? PART-B (50 MARKS) SECTION-I 2. Differentiate between procedure oriented programming languages and object oriented programming languages. 3. What is data hiding? What are different mechanisms for protecting data from the External users of a class object? SECTION-II 4. Write a C++ program to perform complex numbers operations (Add, Sub and Multiply) using friend functions. 5. Explain static data members and static member functions with examples.
SECTION-III 6. Explain the following with illustrative examples i) Copy constructor ii) Parameterized constructor 7. Explain the overloading of unary and binary operators with examples. SECTION- IV 8. a)explain Dynamic memory allocation with an example. [5+5M] b)explain the differences between overloading and overriding with examples. 9. How to achieve run time polymorphism in C++ explain with one example program? SECTION-V 10. Illustrate the features of Templates in the following perspectives. Also list out the advantages of them i) Class template ii) Function template 11. Explain briefly about stream I/O in C++?
Code No: R15A0022 MODEL PAPER -IV MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY B.Tech. I Year - II Semester Examinations OBJECT ORIENTED PROGRAMMING (Common to ECE, CSE, IT, MECH, ANE, Mining) R15 TIME: 3 HOURS MAX. MARKS: 75 NOTE: This question paper contains two parts A and B. Part A is compulsory which carriers 25 marks and Answer all questions. Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions, Choosing ONE Question from each SECTION and each Question carries 10 marks. 1. PART-A (25 MARKS) a) Explain Namespace in C++. Give a suitable example. [2M] b) Explain polymorphism with an example. [3M] c) Distinguish between class and object. [2M] d) Explain default arguments of a class. [3M] e) What is meant by derived class. [2M] f) Describe constructor and destructor. Can constructor and destructor be called explicitly. [3M] g) Explain about virtual Functions and virtual base class? [2M] h) Differentiate between early binding and late binding. [3M] i) Explain Error handling during file operations. [2M] j) Explain Function Templates with Multiple Parameters. [3M] PART-B (50MARKS) SECTION-I 2. Explain the differences between object oriented and procedure oriented programming languages. 3. Explain the features of object oriented programming. SECTION-II 4. a)what is inline function? Explain in detail. [5+5M] b) What is friend function? Explain in detail. 5. What are Static Data Members and Static Member Functions. Explain their usage and benefits in a Program. SECTION-III 6. a) Write about functions that have same name as that of class in C++.What is the purpose of those functions and explain each in detail. b)what is a destructor?explain in detail. [6+4M]
7. Define Inheritance?Explain different types of Inheritance with examples. SECTION-IV 8. What is polymorphism? What are different types of polymorphisms? Explain runtime Polymorphism. 9. a)explain Dynamic memory allocation and deallocation in C++ using new and delete keywords. b) Explain Pointers to Derived Classes. [6+4M] SECTION-V 10.a)Explain Class Templates and Function Templates in detail with examples. [6+5 M] b) What are file streams? Discuss how opening and closing file with a sample C++ program. 11. What is an exception? Explain different types of and their handling mechanisms with [10 M] appropriated programs.
Code No: R15A0022 MODEL PAPER -V MALLA REDDY COLLEGE OF ENGINEERING AND TECHNOLOGY B.Tech. I Year - II Semester Examinations OBJECT ORIENTED PROGRAMMING (Common to ECE, CSE, IT, MECH, ANE, Mining) R15 TIME: 3 HOURS MAX. MARKS: 75 NOTE: This question paper contains two parts A and B. Part A is compulsory which carriers 25 marks and Answer all questions. Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE Questions, Choosing ONE Question from each SECTION and each Question carries 10 marks. 1. PART-A (25 MARKS) a) What is polymorphism? [2M] b) What are the differences between procedural oriented languages and Object Oriented [3M] Languages. c) What is function overloading? [2M] d) Explain inline functions with an example. [3M] e) What do you mean by base class and derived class? [2M] f) Explain dynamic constructor with one example? [3M] g) What is pure virtual function? [2M] h) Explain this pointer with an example. [3M] i) What are templates? [2M] j) Describe the two methods of opening of file. [3M] PART-B (50MARKS) SECTION-I 2. a) Explain the need for OOP and also explain the principles of Object Oriented Programming? [5+5M] b) Explain the differences between procedural languages and Object Oriented Languages. 3. Explain the different types of type casting techniques in C++. SECTION-II 4. Explain static data members and static member functions with examples. 5. With an example,explain the concept of friend functions. SECTION-III 6. Explain syntax of overloading unary postfix operator and explain with examples.
7.Define Inheritance?Explain different types of Inheritance with examples. SECTION-IV 8. Define runtime polymorphism. Write a C++ program to illustrate runtime polymorphism. 9.a) What is a virtual function? Illustrate the same with an example program. [5+5] b) Write a C++ program to access the members of student class using pointers to object members. SECTION-V 10.a)Explain Class Templates and Function Templates in detail with examples. b) Explain briefly about stream I/O in C++? 11.What is an exception? Explain different types of and their handling mechanisms with appropriated programs. [5+5M]