100%(1)Il 100% ha trovato utile questo documento (1 voto)
2K visualizzazioni3 pagine
This sample question paper for an Object Oriented Programming exam contains 6 sections with a total of 80 marks. Section 1 has 8 short answer questions worth 1 mark each. Section 2 has 3 short questions worth 4 marks each. Section 3 has another 3 short questions worth 4 marks each. Section 4 has 2 longer answer questions worth 8 marks each. Section 5 has 1 longer question worth 12 marks. Section 6 has 3 short answer questions worth 4 marks each. The paper covers topics like object oriented concepts, classes and objects, inheritance, polymorphism, files and file handling.
This sample question paper for an Object Oriented Programming exam contains 6 sections with a total of 80 marks. Section 1 has 8 short answer questions worth 1 mark each. Section 2 has 3 short questions worth 4 marks each. Section 3 has another 3 short questions worth 4 marks each. Section 4 has 2 longer answer questions worth 8 marks each. Section 5 has 1 longer question worth 12 marks. Section 6 has 3 short answer questions worth 4 marks each. The paper covers topics like object oriented concepts, classes and objects, inheritance, polymorphism, files and file handling.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
This sample question paper for an Object Oriented Programming exam contains 6 sections with a total of 80 marks. Section 1 has 8 short answer questions worth 1 mark each. Section 2 has 3 short questions worth 4 marks each. Section 3 has another 3 short questions worth 4 marks each. Section 4 has 2 longer answer questions worth 8 marks each. Section 5 has 1 longer question worth 12 marks. Section 6 has 3 short answer questions worth 4 marks each. The paper covers topics like object oriented concepts, classes and objects, inheritance, polymorphism, files and file handling.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
a) Why object oriented programming mostly preferred rather than procedure oriented programming? b) The cin and cout are not keywords. Justify. c) What is an object? Give suitable example. d) Why the inline functions are necessary? e) Is it necessary to declare a destructor for a class? Why? f) What will happen when a class ‘Nation’ contains following two constructors? Nation(int x) {} Nation(int x, int y = 0) { } g) State the necessity of copy constructor. h) Which is advantageous; pointer to character or array of character? Why? i) Can you create the object of the class containing pure virtual function? Justify. j) How C++ achieves run time polymorphism?
Q.2 Attempt any three of the following: 12
a) How an object oriented programming language achieves the advantages of inheritance? Explain. b) class Base { int val; public: Base( ) // statement2 { val = 0; } }; class Derived: public Base { public: Derived( ) // statement1 { cout<<“Derived Constructor”; }
}; In the above example, if you want to call constructor of the Base class at statement1 without creating object. What changes are expected in the program? c) Write a program to demonstrate the overloading of any unary operator using friend operator function. d) Write the syntax or pseudo C++ code for following inheritance hierarchy:
College
Principal Teacher Student
Result
Q.3 Attempt any three of the following: 12
a) Functions can also be passed as the parameter to other functions. Justify this statement with appropriate example. b) Explain the application of new and delete operator in a simple C++ application program. c) Can we achieve the function overloading by writing one function in derived class and another in base class with different prototypes? Explain. d) Why destructors are not overloaded? Explain with example.
Q.4 Attempt any two of the following: 16
a) Declare a class having data members as speed, capacity and price. Write a constructor to initialize these values. Create and initialize an object ‘x’ by calling a constructor. Create two more objects ‘y’ and ‘z’ and initialize them by calling copy constructor implicitly and explicitly respectively. The ‘x’ object is passed as the parameter to this constructor. b) Write a program to declare a class ‘Chandra’ having data member as ‘value’. Create an array of 5 objects, initialize them and find which object’s ‘value’ is largest. c) Attempt the following: i. Differentiate between public and protected. ii. Draw any four conceptual diagrams to show hybrid inheritance.
Q.5 Attempt the following: 12
a) Explain dynamic memory allocation of objects. b) Attempt any one of the following: i. Write a program to pass the entire array to a function using array and return the largest number from it.
ii. Describe the functions performed by all the error handling functions of file streams.
Q.6 Attempt any three of the following: 12
a) Describe the functions performed by following file opening modes: i. ate ii. nocreate iii. noreplace iv. binary b) Write a program to open a file and display the second half contents of the file. c) Explain the functions performed by read( ) and write( ) with syntax and suitable example. d) Explain the file pointer manipulation functions with appropriate example.
Learn Python Programming for Beginners: Best Step-by-Step Guide for Coding with Python, Great for Kids and Adults. Includes Practical Exercises on Data Analysis, Machine Learning and More.
Microsoft 365 Guide to Success: 10 Books in 1 | Kick-start Your Career Learning the Key Information to Master Your Microsoft Office Files to Optimize Your Tasks & Surprise Your Colleagues | Access, Excel, OneDrive, Outlook, PowerPoint, Word, Teams, etc.
CODING FOR ABSOLUTE BEGINNERS: How to Keep Your Data Safe from Hackers by Mastering the Basic Functions of Python, Java, and C++ (2022 Guide for Newbies)
Modern Tkinter for Busy Python Developers: Quickly Learn to Create Great Looking User Interfaces for Windows, Mac and Linux Using Python's Standard GUI Toolkit
Microsoft PowerPoint Guide for Success: Learn in a Guided Way to Create, Edit & Format Your Presentations Documents to Visual Explain Your Projects & Surprise Your Bosses And Colleagues | Big Four Consulting Firms Method
The Advanced Roblox Coding Book: An Unofficial Guide, Updated Edition: Learn How to Script Games, Code Objects and Settings, and Create Your Own World!