0% found this document useful (0 votes)
63 views3 pages

BCS-031 June 17

The document is an examination paper for the BCA course on Programming in C++, consisting of various questions related to object-oriented programming concepts, C++ syntax, and programming tasks. It includes compulsory and optional questions covering topics such as inheritance, templates, exception handling, and abstract classes. The exam has a total duration of 3 hours and is worth 100 marks, with specific weightage assigned to different sections.

Uploaded by

Shiv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views3 pages

BCS-031 June 17

The document is an examination paper for the BCA course on Programming in C++, consisting of various questions related to object-oriented programming concepts, C++ syntax, and programming tasks. It includes compulsory and optional questions covering topics such as inheritance, templates, exception handling, and abstract classes. The exam has a total duration of 3 hours and is worth 100 marks, with specific weightage assigned to different sections.

Uploaded by

Shiv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

No.

of Printed Pages : 3 I BC S-031 I


BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
Term-End Examination
June, 2017

BCS-031 : PROGRAMMING IN C++

Time : 3 hours Maximum Marks : 100


(Weightctge : 75%)

Note : Question no. 1 is compulsory and carries 40 marks.


Attempt any three questions from the rest.

1. (a) Why are object oriented programming


languages more popular than structured
programming languages ? Differentiate
between structured and object oriented
programming languages.
(b) Explain ambiguity resolution in multiple
inheritance. What happens if we don't use
a virtual function in the inheritance ?
(c) Write a C++ program to create a matrix
class. Define constructor and destructor for
this class. Also define a method to find the
sum of two matrices. 10

BCS 031
- 1 P.T.O.
(d) Define the Standard Template Library.
How is the class template different from
the function template ? Explain. 6

(e) Differentiate between private, protected


and public access modifiers with the help of
an example for each. 6

(f) How is constructor different from the


`constructor with argument' ? Explain by
using an example. 6

2. (a) Write a program to demonstrate the


catching of all exceptions. What happens
when a raised exception is not caught by
catch-block (in the absence of catching all
exception blocks) ? 10

(b) Write a program to implement the


overloading of « operator. 10

3. (a) How do we declare static class data ?


Explain the syntax and rules to define
static class data. 5

(b) Write a short program to implement the


concept of passing object as argument. 5

BCS-031 2
(c) Write the general form of the user-defined
manipulators. Design a single manipulator
format to provide the following output
specifications for printing float values : 10
(i) 10 column width
(ii) Right Justified
(iii) Two-digit precision
(iv) Filling of unused places with *
(v) Trailing zeroes shown

4. (a) What is the importance of Abstract Class ?


Write a program to implement the concept
of abstract class in C++. Also explain why
an abstract class cannot be instantiated. 10
(b) Write a program to calculate the factorial
of a given number by using copy
constructor. Also write comments in your
program wherever required. 10

5. Write short notes on the following : 4 x 5=20


(a) Destructor
(b) Pure Virtual Function
(c) Friend Function
(d) Multiple Inheritance

BCS-031 3 3,500

You might also like