Thursday 24 February 2011

MCA Sem-II Object oriented Concepts & Programming January 2011 GTU Question paper for Object oriented Concepts & Programming ; GTU question paper for MCA 2011 ; GTU questionbank 2011

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
declaration - int mul(int a,b);
03
2. What is the use of parameterized constructor? Define dynamic constructor. 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
(b) 1. What is operator overloading? What is the difference if friend function is used in
the place of member functions for overloading binary operator?
03
2. How type conversion from a class to basic type is performed? Which conditions
casting operator function should satisfy? Can the constructor student (int rollno,
double percentage) for class student be used to convert types?
04
Q.2 (a)
1. Explain keyword “this” in C++ language. What are the applications of this
pointer?
03
2. Explain the manipulators provided in the header file iomanip that can be used to
manipulate the output formats. Explain how a user can create his own manipulator.
04
(b) 1. What is the difference between opening a file with a constructor function and
opening a file with open() function? When is one method preferred over the other?
03
2. What is an abstract class? What is virtual base class? 04
OR
(b)
1. What is the difference between overloaded functions and function templates?
Justify - Is this a legal statement –
Template
Class Test
{
};
03
2. What is an exception? When does a program throw an exception? What should be
placed inside a try block? What should be placed inside a catch block?
04
Q.3 (a)
1. What is Standard Template Library(STL). Which three types of containers are
there in STL?
03
2. What is the use of keyword “namespace”? Explain with example how to define a
namespace.
04
(b) 1. Describe the set of classes that define the file handling methods the I/O system of
C++ contains.
03
2. Explain under what circumstances the following statements would be used?
(i) throw;
catch(…)
04
2
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
macro?
03
2. What is a copy constructor? What is the difference between the following
statements?
Integer I2(I1);
I2=I1;
04
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
a function template?
03
2. Which containers are supported by Standard Template Library (STL)? 04
OR
Q-4 (a) 1. What is a file mode? Describe the various file mode options available. 03
2. What is the role of following functions? seekg() , seekp() tellg(), tellp() 04
(b)
1. How can a necessary width of a field be defined for the output of an item with ios
member function?
03
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
2. When a member function can be called const member function? 02
3. What is the purpose of local class? 02
(b) 1. A function can also return a reference – explain. 03
2. How can you pass object as a function argument? 04
OR
Q-5 (a) 1. Explain constant pointer and pointer to constant. What is the use of const qualifier? 03
2. What is the difference between a structure and a class in C++? 02
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

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms