How To Exam?

a knowledge trading engine...


Gujarat Technological University 2010 M.C.A Object Oriented Concepts and Programming (OOCP) Remedial ember- - Question Paper

Monday, 22 July 2013 08:00Web



Seat No. :__Enrolment No._

GUJARAT TECHNOLOGICAL UNIVERSITY

MCA. Sem-II Remedial Examination December 2010

Subject code: 620003 Subject Name: Object oriented Concepts & Programming Date:18 /12 /2010    Time: 10.30 am - 01.00 pm

Total Marks: 70

Instructions:

1.    Attempt all questions.

2.    Make suitable assumptions wherever necessary.

3.    Figures to the right indicate full marks.

Q.1 (a) 1. Write the different ways of writing function prototypes. Find errors, if any in the 03 declaration - int mul(int a,b);

2. What is the use of parameterized constructor? Define dynamic constructor. What 04 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);

(b) 1. What is operator overloading? What is the difference if friend function is used in 03 the place of member functions for overloading binary operator?

2. How type conversion from a class to basic type is performed? Which conditions 04 casting operator function should satisfy? Can the constructor student (int rollno, double percentage) for class student be used to convert types?

Q.2 (a) 1. Explain keyword this in C++ language. What are the applications of this    03

pointer?

2. Explain the manipulators provided in the header file iomanip that can be used to 04 manipulate the output formats. Explain how a user can create his own manipulator.

opening a file with open() function? When is one method preferred over the other?

OR

Justify - Is this a legal statement -Template<class T1, class T2>

Class Test

{

};

2. What is an exception? When does a program throw an exception? What should be 04 placed inside a try block? What should be placed inside a catch block?

Q.3 (a) 1. What is Standard Template Library(STL). Which three types of containers are    03

there in STL?

2. What is the use of keyword namespace? Explain with example how to define a 04 namespace.

(b) 1. Describe the set of classes that define the file handling methods the I/O system of 03 C++ contains.

(i) throw;

catch(...)

OR

Q-3 (a) 1. Explain with example the types of get() functions.    03

2. What are the different types of inheritance?    04 (b) 1. When a function will be made inline? Why? How does it differ from preprocessor 03 macro?

2. What is a copy constructor? What is the difference between the following    04 statements?

Integer I2(I1);

I2=I1;

Q-4 (a) 1. Explain static member variable and member function.    03

2. Explain with example how to overload unary operators.    04 (b) 1. What is a virtual function? When do we make a virtual function pure? What is 03 a function template?

OR

Q-4 (a) 1. What is a file mode? Describe the various file mode options available.    03

1.    How can a necessary width of a field be defined for the output of an item with ios 03 (b) member function?

2.    Which functions can be used for reading a string?    04

Q-5 (a) 1. How can the address of a member of a class be assigned to a pointer    03

3.    What is the purpose of local class?    02 (b) 1. A function can also return a reference - explain.    03

OR

3.    How does a class accomplish data hiding?    02 (b) 1. What is the role of destructor? How it is defined and when it is invoked?    03

2. How is polymorphism achieved at (i) compile time and (ii) run time?    04

2







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Gujarat Technological University 2010 M.C.A Object Oriented Concepts and Programming (OOCP) Remedial ember- - Question Paper