You are on page 1of 7

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________

NOTE : Please Read and Prepare from the Xerox copy of assignment book given to you.
Que : 1

1) Compare Structured Programming with Object Oriented Programming.


[03] 2) What is Object Oriented Programming? How it can be differentiated with Procedure Oriented Programming? [04] 3) Differentiate between POP and OOP. [04] 4) What is the difference between a structure and a class in C++? [02]

Que : 2

5) How is the memory allocated to the object of a class? Explain with example.
[04] 6) What is reference data type? Explain with example. [04] 7) A function can also return a reference.-Explain. [03] 8) In which case we can use function on Left Hand Side ? Describe the scenario with example. [07]

Que : 3

Que : 4

9) Which storage class data member is having single copy of variable for all
the objects? Describe with appropriate example. [07] 10)Explain static data members and static member functions. 10)Explain [04] 11) Explain the concept of static in context to class. [04] 12) Explain the need of static function for a class. [03] 13)Explain the following terms with example. Explain 13) [04] (1) Static data member (2) Static function

Que : 5

14)What is the advantage of passing argument by reference? 14)What [02] 15) Explain and differentiate between pass by value and pass by reference. [03] 16) How a function can be called by value and by reference? Explain the difference. [04]

Que : 6

17)

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________

What do you mean by overloading of member function? When do we use this Concept? Give example. [04] 18) How compile-time polymorphism can be achieved in C++? Explain with example. [03] Que : 7

19) 20)

What is a constructor? Explain constructor overloading with example? [04] State/List and explain different types of constructors. [04]

Que : 8

21)

Define Constructor. Give characteristics (properties) of a constructor. [04] 22) Define Destructor. Give characteristics (properties) of a destructor. [04] 23)Differentiate between Constructor and Destructor. 23)Differentiate [03] Que : 9

24)

List and explain the concepts of OOP. [07] 25) What is Inheritance? Explain its all the types. [04] 26)What are the unique advantages of OOP paradigm? What 26) [03]

Que : 10

Differentiate between macro definition, normal function and inline function. What are the advantages and disadvantages of inline function? [07] 28)Write the different ways of writing function prototypes. Find errors, if any in 28)Write the declaration - int mul (int a,b); [03] 29)When a function will be made inline?Why? How does it differ from preprocessor 29)When macro?[03] 30)Explain the term inline function with suitable example in brief. 30)Explain [03] Que : 11 31) What are read only objects? Explain the role of constructors in creating such objects? [04] Que : 12

27)

Explain the access specifiers available in C++. [04] 33)Explain different access specifiers with suitable examples. 33)Explain [05] Que : 13 34) Explain friend function with suitable example. [03] 35)Explain friend function. 35)Explain [07] 36) Explain friend function with its advantages. [03] Que : 14 37)What is the use of parameterized constructor? Define dynamic constructor. 37)What What is the difference between following two statements, if integer is a class and integer(int x,int y) is the constructor method. integer int1=integer(0,100); integer int1(0,100); [04] 38)What is copy constructor? What is the difference between the following 38)What statements? Integer I2(I1); I2=I1; [04] Que : 15 39)What is operator overloading? What is the difference if friend function is used 39)What in the place of member functions for overloading binary operator? [03] 40)Explain with example, how to overload unary operators. 40)Explain [04] 41)What is operator overloading? How binary operator is overloaded in C++? 41)What Explain it with suitable example. [07] Que : 16 42)How type conversion from a class to basic type is performed? Which conditions 42)How Casting operator function should satisfy? Can the constructor student (int rollno, double percentage), for class student be used to covert types?[04] types?[04] Que : 17

32)

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________

43) 44)

When a member function can be called const member function? [02] How can you pass object as a function argument. [04]

Que : 18

45)

What is the purpose of local class? [02]

46)

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________
What is local class? How and why it is used in C++? Explain with example. [04]

47)How user defined Type Conversion is achieved in C++? Explain it in detail. 47)How [07] (Explain Class to Class Conversion in detail) Que : 19 48)How is polymorphism achieved at (i) compile time and (ii) run time? 48)How [04] (Explain both with example) 49)Distinguish between compile time polymorphism and run time polymorphism. 49)Distinguish [03] (Give differences in two parts) 50)Explain polymorphism. How do you achieve run time polymorphism in C++? 50)Explain [07] (Give Definition of run time polymorphism Explain the process to achieve run time polymorphism Include the concept of virtual function Give one example program with base class pointer and assigning derived class object to it by using new) Que : 20 51)Explain the need of virtual base class with example. 51)Explain [03] (Explain the need of virtual base class in multi-path inheritance to resolve ambiguity) 52)What is virtual base class? Explain with example. 52)What [04] (Give definition of virtual base class, Give general syntax of virtual base class, Give example of multi-path inheritance) 53)Write a note on virtual base class. Explain its significance with example. 53)Write [05] (Combine the answers of upper said two questions) 54)What is an abstract class? What is virtual base class? 54)What [04] (Give definition of both, Explain both with examples each for 2 marks) 55)Explain virtual base class with example. 55)Explain [07] (First give definition of virtual base class, Explain multi-path inheritance, Explain the Case of duplication of properties of base class in lastly derived class, Explain the need Of virtual base class to avoid the ambiguity, Write general syntax of virtual base class, Give example program of multi-path inheritance and declare base class as virtual base class) Que : 21 56) What is virtual destructor? Explain its need. Can we have virtual constructor? Why? [07]

(Give definition of virtual destructor, Give general syntax of it, Explain its need in run-time polymorphism, We can not have virtual constructor, Reason : because constructors are not directly inherited in derived class. When object of derived class is created at that time, base class Constructor is always automatically called before derived class constructor is called). 57)Explain virtual destructor. [02] 57)Explain (Give definition of virtual destructor. Give its need and small example program) Que : 22 58)What is this pointer ? Explain with example. 58)What [04] (Give definition of this pointer. Explain its usage with example). 59)Explain keyword this in C++ language. What are the applications of this 59)Explain pointer? [03] Que : 23 60) Explain the functions used for random access of file . [03] (Explain functions seekp(), seekg(), tellp(), tellg(), Explain each function in following manner 1. Give signature 2. Explain its each argument 3. Explain working of it Give final explanation in relation with accessing random file). 61)How random files are managed in C++? Explain. 61)How [03] (Same as above). 62) List out various modes of opening a file. Explain app and ate with example. [04] (Give list of various modes with description to open a file, Explain app and ate mode In detail with one example program, In example program : open two files, one with app mode and another with ate mode, File opened with ate mode will provide random access). 63)What are the different opening modes of file? Explain their operations in brief. 63)What [03] (Give list of all 8 file modes and describe them with their brief operations) 64)What is the difference between opening a file with a constructor function and 64)What Opening a file with open() function? When is one method preferred over the other? [03] (First give proper difference of both, In preference of the method write : When we open

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________

A file very first time, we should use constructor. But if we open another file with same file object at that time, it is more preferable to use open() member function) 65)Describe the set of classes that define the file handling methods the I/O system 65)Describe of C++ contains. [03] (Give the class hierarchy of file I/O system of C++, Explain istream class with its all the Functions, explain ostream class with its all the functions) 66)What is a file mode ? Describe the various file mode options available. 66)What [03] 67)What is the role of following functions ? 67)What seekg(),seekp(), tellg(), tellp() [04] (Describe each function with following format 1. Give signature 2. Explain its each argument 3. Explain working of it/Role of function Give final explanation in relation with accessing random file) 68)Describe text and binary streams. Explain process steps to read and write 68)Describe from text and Binary files. [07] (Explain file operation in text mode, explain the file operation in binary mode, Give steps to read and write a file in text mode , to write : put() function, to read : get() function. Give steps to read and write a file in binary mode, to write : write() function, to read : read() Function, give signature of all the functions, also set ios::binary mode for binary file operations). 69)Explain the various error handling functions of files in C++. 69)Explain [04] (write and describe following functions of ios class. (1)eof() (1)eof() (2)fail() (2)fail() (3)good() (3)good() (4)bad () (4)bad (5)clear() (5)clear() Explain these functions with following format 1. Give signature 2. Explain its each argument 3. Explain working of it/Role of function) Que : 14

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________

70)

MCA Sem-2 OOCP, April-2012 __________List of the questions to be prepared for final GTU exam____________
Explain : Abstraction and Encapsulation. [04] (Explain both the concepts in detail with one practical example). What is virtual function? When do we make a virtual function pure? [03] (Give definition of virtual function, explain pure virtual function, give general syntax Of pure virtual function).

Que : 15

71)

72)Explain pure virtual function. 72)Explain [03] (Same as above). 73)Explain virtual function. 73)Explain [07] (Explain virtual function in detail with suitable example). Que : 16

74)

Explain member initialization list. (M.I.L.) [07] (Explain M.I.L. in detail with suitable example).

Que : 17 75)Explain the following with suitable examples: 75)Explain (i) Abstract class [03] (Give definition of abstract class, Explain abstract class with example) (ii) Composite objects ( Container ship), (has-a relationship) [04] (Explain containership with example, Last topic of inheritance chapter)

You might also like