BCA 2nd - C++ PROGRAMMING previous year question 2012

BCA 2nd YEAR C++ PROGRAMMING Last & Previous Year Question

BCA 2nd - C++ PROGRAMMING previous year question 2012



Part-A 10 x 1 = 10

1. List a few areas of application of OOP technology.
2. Write any two applications of scope resolution operator :: in C++?
3. What are objects? How they are created?
4. How do we invoke a constructor function?
5. When do we make a class virtual?
6. What does this pointer point to?
7. What are the input and output streams?
8. Identify the error in the following program :
void main()
    int num [ ] = {1, 2, 3, 4, 5, 6}
    mum [1] == [1] num ? cout<< "success":
    cout>> "error";
9. Describe the mechanism of accessing data members and member functions in following case :
Inside a member function of the same class.
10. A class alpha has a constructor as follows:
alpha (int a, double b);
Can we use this constructor to convert types ?

Part-B 5 x 2 = 10

11. What do you mean by dynamic binding? How is it useful in OPP?
12. What is overloading of a function ? When do we use this concept ?
13. How is dynamic initialization of objects achieved ?
14. In what order are the class constructors called when a derived class object is created ?
15. How do the following two statements differ in - operation ?

Part-C 10 x 3 = 30

16. What is object-oriented programming ? How it is different from the procedure oriented programming ? What are the unique advantages of an object oriented programming paradigm ?
Distinguish between the following:
(a) Objects and classes.
(b) Data abstraction and data encapsulation.
(c) Dynamic binding and Message-passing.
17. Define a class string. Use overloaded == operator to compare two strings.
What does polymorphism mean ? How is polymorphism achieved at
(a) Compile time
(b) and Run time
18. What are the steps involved in using a file? What is the difference between opening a file with a constructor and opening a file with open ( ) function? When is one method preferred over the other?
Write source code to define copy constructor.