How To Exam?

a knowledge trading engine...


West Bengal Institute of Technology (WBIT) 2008 M.C.A 202 Information Systems Analysis & Design - Question Paper

Thursday, 18 July 2013 06:30Web



.. ' CS/MCA/8EM-2 /MCA-205/06

I JwwleL l


3


ENGINEERING ft MANAGEMENT EXAMINATIONS, JUNE - 2008

OBJECT ORIENTED PROGRAMMING WITH C++

SEMESTER-2

[ Pull Marks : 70

Time : 3 Hours ]


GROUP - A (Multiple Choice Typf Questions)

1. Choose the correct alternatives for any ten of the following :    10 x 1 10

i) Constructors can be

- . .

a)    virtual

b)    return type

c)    inherited

d)    generated by default if not provided by the programmer.    1 Which operator of the following cannot be overloaded ?

b) ?

d) delete,

c) []


Hi) Private member of the super-dass

a) is both extended as well as accessed inside sub-class

b) is extended but cannot be accessed inside sub-class

c)    is not Extended but can be accessed inside sub-class

5* j- i .    -

d)    is not both extended as well as accessed inside sub-class.

H-222522 (5)

tv) The difference between new operator and mallocO Is .that

a)    more memory space ls aUdcLtedihcase of new operator

_             - * f - ' 4K \    ;    .

b)    mallocO allocates memory space dynamically

c)    new can be overloaded

d)    mallocO can allocate memory space for any type of data,

v) What will be the output of the foDowlng pfece of code ?

#include<iostream.h>

#deflne a 2;

int malnO    -    .

- { . . int j = 3; int i = a+j++;

couti; < v        ;

return 0;

}

b)

d)


6

4.


a) Compilation error

c) 5

vi) The major goal of inheritance in C++ is to

a)    to facilitate the coriversion of data types

b)    to help modular programming

c)    to facilitate the reusability of code

d)    to hide the details of base classes.

vii) Which of the following is/are overloading the function shown below ?

.    "3'        "  . -    -

int sum (int x, int y) { // }

a)    int sum (int x, int y, int z) {}

b)    int sum (floatx, floaty) {}    ,

c)    int sum (int x, int y, float z) {}

d)    all of these.    __

viii). The function show 0 is a member of the class A & obj Is an object of A & ptr is a pointer to A. Which of the following are valid access statements ?

a)    obj.showO;

- . * , ,

b)    ptr-showO;

c)     (*pti).showO; , , v    ,

d)    all of these.    ;    L_

ixj Consider the declarations :

char a;

const char aa=h;

char *na;        

const char *naa;    .

' ' ' '.. - ' ' *' ' r * i J -

Which of the following statements is/are illegal ?    

       r        

: . 1 ' " . ' "  : ; :

a) Only I and II    , b) Only U and in

c) Only I and III    d) All are illegal.    1

xi class A : public Bi public C

\


is an example of what kind of inheritance ?

a) single    b) multiple

c) multilevel    d) hierarchical.

xi)    A class has one data member and one method member. This class is used in a program that declares 10 objects of this class. The numbers of addresses for data member and method member are respectively

10 and 1    b) 10 and 10

a)

c)


0 and 10    d) none of these.

xii)    Dynamic binding is necessary when we refer to derived class object with

a) global pointer    b) derived class pointer

c) non-pointer variable    d) base class pointer.    |

' ' ' . . . , .

GROUP-B

( Short Answer Type Questions)    '

Answer any three of the following.    .    3x5=15

2.    What do you mean by exception ? Write down the purposes of the following keywords :

# try

10 catch

iii) throw.    2 + 3

3.    Why can constructors not be virtual ? Can destructor be virtual ? Give reasons and explain your answer.    5

4.    What do you mean by a reference variable ? Is there any difference between reference variable and pointer ? Explain with example. ,    3 + 2

5.    Write down the differences between object-oriented programming languages and earlier (non-object-oriented) programming languages.    5

6.    What are friend functions*? What are their implications on information hiding.    5

n-aaasaa (sT


GROUP -C (Long Answer Type Questions)

Answer any three questions.    3 x 15 = 45

7.    a) What Is stream ?

b)    What is "Ellipsis" ?

c)    Write a C++ program to write into a file named 'test.txt' the text 'Department of MCA 1st year, 2nd Semester" and without closing the file, print the content of 'test.txt' on the console.    .

d)    Illustrate the use of nested try block. Is it necessary that number of catch blocks should be equal to the number of try blocks ? Justify your answer with proper example.    2 + 2 + 6 + ( 3 + 2 )

8.    What is operator overloading ? Why is it necessary to overload an operator ? Create a class Complex that will contain complex numbers. Use operator overloading to create addition, subtraction and multiplication operators which will operate on Complex.

2 + 3+10

9.    What do you mean by virtual base class ? What do you mean by polymorphism ? How is the polymorphism achieved at run time in C++ ? What is late binding ? Write a program to concatenate two strings of two different objects using operator overloading with constructor.    2 + 2 + 4 + 2 + 5

10.    How can we distinguish between prefix and postfix nature while overloading the unary ++ operator ? Write a program to overload the new operator. When do we use the protected visibility specifier to a class member ? What are the advantages of using 'new' operator over mallocO ? What is runtime polymorphism ?

1    3+5+3+2+2

11.    What Is the specialty of a template function ? Give examples. Design template class to implement a queue. What is an Exception ? How are these handled In C++ ?

END

D-222522 (5)

; - i "


4 + 6 + 2 + 3







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER West Bengal Institute of Technology (WBIT) 2008 M.C.A 202 Information Systems Analysis & Design - Question Paper