How To Exam?

a knowledge trading engine...


University of Pune 2010 M.C.A OBJECT ORIENTED PROGRAMMING USING C++ (2005 Pattern) - Question Paper

Tuesday, 23 April 2013 10:00Web



INI nil INI INI    [3780] - 34

M.C.A. (Semester - III) (Management Faculty) Examination, 2010

IT - 34 : OBJECT ORIENTED PROGRAMMING USING C++

(2005 Pattern)

Time : 3 Hours    Max. Marks : 70

Note : 1) Q. 1 is compulsory.

2)    Solve any six from Q. 2 to Q. 10.

3)    Figures to right indicate full marks.

4)    Make suitable assumptions wherever necessary.

1. Explain output of the following programs. If errors, correct it.    10

A)    # include < iostream. h > void main ( )

{ int i = 0;

for (i=0; I < 20 ; i ++)

{ switch (i) case 0:i+=5; case 1 : i+=2; case 5:i+=5; default i+ =4; break;} cout <<j; } }

B)    main ()

{ char c = - 64; int i = - 32

unsigned int u = - 16; if (c>i) { printf (passl,);

if (c<U) printf (pass2); else printf (Fail2);

}

else

printf (Fail 1); if(i<u) printf(pass2); else printf (Fail2)

}

#include <iostream.h>

C)


#include<conio.h> class test { static int cnt ;

public: static void show count (void)

{

cout << count : << ++cnt << in ; }

};

void main( )

{ test tl, t2, t3; tl.showcount( ); t2.showcount( ); t3.showcount( );

}

Explain Iterators in STL.

D)

2.    A) B)

3.    A)


What is namespace conflict ? How it is handled in C++ ?    5

What is generic program ? What is class template explain in detail ?    5

Write a class VECTOR with a series of float values and perform the following operations :    5

i)    To create a vector

ii)    To add two vectors - use object as parameter.

What is a file mode ? Describe the various file mode options available. What is the difference between ios::ate and ios::app.    5

B)


4. What is parameterized constructor ? How the derived class constructors are used to pass parameters to base class in multi level inheritance ? Explain with program.    10

5.    Accept date D in DD-MM-YYYY format and an integer number n from keyboard. Write a program to overload + (plus) operator which gives the next date,

n days after D, in DD-MM-YYYY format. E.g. if D = 26-01-2010 & n = 5 then function returns 31-01-2010    10

6.    Define a class to represent a Bank Account. Include the following

Data Members :

a)    Name of the Depositor

b)    Account No.

c)    Type of Account ( Saving, Current, Fixed Deposit, Loan)

d)    Balance Amount.

Member Functions :

a)    To Assign initial value

b)    To Deposit an amount

c)    To withdraw an amount

d)    To display Name of Depositor & Balance.

Define all member functions and main( ). Generate the saving account report slip as an output.    10

7.    What is Exception ? Write a program to accept the string in upper case and display

it in lower case. Raise an exception if input string is not in upper case.    10

8.    What are file input and file output streams ? Explain seekg( ), seekp ( ), tellg( ), tellp ( ).

10

9.    Write a C++ program that reads the data from command prompt and copy it to FILE 1 .txt. Also calculate and display total no. of Lines in FILE 1.    10

10. Explain with example (Any two) :    10

A)    Object Oriented Programming

B)    Abstract Class

C)    RTTI.

B/l/10/335







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER University of Pune 2010 M.C.A OBJECT ORIENTED PROGRAMMING USING C++ (2005 Pattern) - Question Paper