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

Bachelor of Computer Applications (Revised) Term-End Examination

This document contains instructions and questions for a term-end examination in Programming in C++. It has 6 questions to be answered in 3 hours. Question 1 is compulsory and carries 40 marks, while 3 questions must be attempted from the remaining 5. Question 1 has 6 sub-parts asking about object-oriented programming benefits, factorial using copy constructor, inline functions with an example, difference between class and function templates with examples, and multilevel inheritance with comments. It also asks about objects and passing them as function arguments. The other questions ask about constructors, virtual functions, operator overloading, abstract classes, polymorphism, file streams, friend functions, C++ containers and exceptions, and a program to find circle area.

Uploaded by

Sunil Mishra
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)
46 views3 pages

Bachelor of Computer Applications (Revised) Term-End Examination

This document contains instructions and questions for a term-end examination in Programming in C++. It has 6 questions to be answered in 3 hours. Question 1 is compulsory and carries 40 marks, while 3 questions must be attempted from the remaining 5. Question 1 has 6 sub-parts asking about object-oriented programming benefits, factorial using copy constructor, inline functions with an example, difference between class and function templates with examples, and multilevel inheritance with comments. It also asks about objects and passing them as function arguments. The other questions ask about constructors, virtual functions, operator overloading, abstract classes, polymorphism, file streams, friend functions, C++ containers and exceptions, and a program to find circle area.

Uploaded by

Sunil Mishra
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

BCS-031

BACHELOR OF COMPUTER APPLICATIONS


(Revised)
Term-End Examination

00074

December, 2014
BCS-031 : PROGRAMMING IN C ++

Maximum Marks : 100


(Weightage 75%)

Time : 3 hours

Note : Question no. 1 is compulsory and carries 40


marks. Attempt any three questions from the rest.

1.

(a) Why did people change over from


structured programming to object-oriented
programming ? Explain it in brief with the
help of an example.
(b) Write C++ program to find factorial of a
given number using copy constructor.
(c) What do you mean by inline function ?
What is its importance in object-oriented
programming languages. Write C++
program to clarify the concept of inline
function.
(d) Differentiate class template and function
template with the help of an example.
(e) Write C++ program to implement
multilevel inheritance. Provide the
necessary comments to clarify the
availability of data members and member
functions in different classes.

BCS-031

6
8

8
8

P.T.O.

(f) 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.
2.

3.

4.

(a) What do you mean by constructors ? Write


the characteristics of constructors. Write a
program to illustrate the use of constructor
in C++ programming.

10

(b) What happens if we don't use the virtual


function in the inheritance ? Explain the
importance of virtual function in the
reference of the above, with the help of an
example.

10

(a) What are the needs of operator overloading


in the program ? Why can't some operators
be overloaded ? Write C++ program to add
two complex numbers using plus (+)
operator overloading.

10

(b) Why does abstract class play an important


role in object-oriented programming ?
Write C++ program of abstract class which
uses the concept of pure virtual function.

10

(a) What do you mean by polymorphism ? How


is run time polymorphism different from
compile time polymorphism ? Give
example(s) to support the above
differentiation.

10

BCS-031

(b)

What do you mean by the file stream


operations ? Write C++ program to
demonstrate the reading from disk file and
writing the result to the disk file.

(c)

What is friend function ? Explain its


concept with the help of a suitable
example.

5. (a) Describe all types of containers that are


available in C++ with their importance, in
detail.
10
(b) Explain a situation when you will use
multiple catch statements in a C++
program for exception handling.
(c)

BCS-031

Write a C++ program to find the area of a


circle.

9,000

You might also like