BCS-031 Question Paper of December 2020 Term End Exam

0
Share

BACHELOR OF COMPUTER APPLICATIONS (B.C.A) (REVISED)

Term End Examination December, 2020

BCS-031 : PROGRAMMING IN C++

Time : 3 hours

Maximum Marks : 100
Weightage : 75%


Note :

Question number 1 is compulsory and carries 40 marks. Attempt any three questions from the rest


  1. (a) What is construction ? Explain the advantages of construction with the help of an example. 5

    (b) What is function template ? Write a function template SUM to add two numbers. 5

    (c) List the merits and demerits of single inheritance over multiple inheritance. 5

    (d) How is a structure in a C++ different from a class ? Explain with the help of an example. 5

    (e) What is an object in C++ ? Explain, how an object can be passed as an argument to a function with the help of an example.

    (f) What is a friend function ? Explain its advantages with the help of an example. 7

    (g) What is an inline function ? Explain the advantages of inline function, with the help of an example.
  2. (a) What is exception ? Explain how exception handling is done in C++, with the help of a program. Also discuss, what will happen if an exception is thrown outside of a try block. 10

    (b) What is template class ? Explain the advantages of template class. 5

    (c) Write C++ program to find average three given numbers. Define appropriate class and methods in the program. 5
  3. (a) What is function overloading ? How is it different from function overriding ? Explain with an example program for each. 10

    (b) What is virtual function ? Write a program in C++ to create a class Doctor with a virtual function salary. Derive a class visiting Doctor and implement function salary in it. 10
  4. (a) Explain, how function calls are matched in C++ program in which functions are overloaded. Use appropriate example program for your explanation. 10

    (b) Write C++ program to implement simple calculator to perform ‘+’, ‘-‘, ‘*’, ‘/’ on two operands. Your program should have methods for reading data and for performing arithmetic operations. 10
  5. Write short notes on the following : 5×4=20
    (i) Copy constructor
    (ii) Access control specifier
    (iii) Stream manipulators
    (iv) Message passing
    (v) Scope resolution operator

Download IGNOU BCA Solved Assignments

IGNOU BCA