BCS 031 June2010 June2023 IGNOUAssignmentGuru - Com 1
BCS 031 June2010 June2023 IGNOUAssignmentGuru - Com 1
om
Term-End Examination
December, 2012
O
c
O
BCS-031 : PROGRAMMING IN C++
ru.
Time : 2 hours Maximum Marks : 100
(Weightage 75%)
u
Note : Question number 1 is compulsory and carries 40 marks.
1.
tG
Attempt any three questions from the rest.
programming.
(d) What is an object ? Explain how objects in 8
C++ are created and destroyed, with the
OU
display balance.
BCS-031 1 P.T.O.
(e) Explain the concept of copy constructor 6
with the help of an example program.
om
(f) What is function template ? Write a
function template SUM to add two
numbers.
c
ru.
2. (a) Write a program in C++, which take two 10
3 x 3 matrices as input and find sum of them.
u
Implement suitable constructor and
destructor for this program.
tG
(b) What is message passing ? Explain how 10
message passing is used in C++
en
programming with an example.
nm
BCS-031 2
4. (a) Explain need of operator overloading. Also 10
explain why some operators can not be
m
overloaded ? Write a C++ program to
overload '+' operator to add two character
.co
strings.
(b) What is data stream ? Explain stream 5
hierarchy in C++.
uru
(c) What is friend function ? Explain its 5
advantage with the help of an example.
5.
tG
(a) What is polymorphism ? Explain advantage 10
of polymorphism. Also write a C++
program to explain use of virtual function.
en
(b) What is exception ? Explain how exception 10
handling is done in C++ with the help of a
nm
B CS-031 3
No. of Printed Pages : 3 B CS-031
m
BACHELOR OF COMPUTER APPLICATIONS
(Revised)
.co
Term-End Examination
O
June, 2013
O
uru
BCS-031 : PROGRAMMING IN C++
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
tG
Note : Question number 1 is compulsory and carries 40 marks.
Attempt any three questions from the rest.
en
1. (a) What is object - oriented programming 6
paradigm ? Explain advantages of object -
oriented programming paradigm over
m
BCS-031 1 P.T.O.
(e) What is operator overloading ? Briefly 6
explain general rules of operator
m
overloading.
(f) What is stream manipulator ? Explain use 5
.co
of setw( ) and setprecision( ) as stream
manipulator.
uru
2. (a) Differentiate C++ programming language 5
from C programming language in terms of
parameter passing in functions..
(b)
types in C++. tG
What is data type ? Draw hierarchy of data 5
en
(c) Write a C++ program to implement simple 10
calculator to perform '+, —, *, /' on two
m
BCS-031 2
4. (a) What is need of exception handling in C++ 10
programming ? Explain with an example
m
how exceptions are handled in C++. Briefly
describe the hierarchy of exception classes
.co
in C++ standard library.
(b) What is template class ? Explain advantages 10
of template class. Create a template class
uru
for Linked - List data structure.
tG
different from function overriding ? Explain
with an example of each.
(b) How function calls are matched with 10
en
overloaded functions in C++ ? Explain with
the help of a C++ Program.
m
si gn
As
OU
IGN
BCS-031 3
No. of Printed Pages : 2 BCS-031
m
BACHELOR OF COMPUTER APPLICATIONS
(Revised)
.co
Term-End Examination
December, 2013
uru
BCS-031 : PROGRAMMING IN C++
Time : 3 hours Maximum Marks : 100
(Weiglitage 75%)
tG
Note : Question number 1 is compulsory and carries 40 marks.
Attempt any three questions from the rest.
en
1. (a) Explain the basic characteristics of object 6
oriented programming (OOP). Also explain
nm
BCS-031 1 P.T.O.
2. (a) What is exception handling ? How is it 10
m
performed in C++ ? Explain with the help
of an example.
.co
(b) Write an object oriented program in C++ to 10
read a set of integer numbers. Upto n, where
n is defined by the user and print the
uru
contents of the array in the reverse order
using a class template.
tG
of any three numbers using a member
function defined in a class.
(b) What is static member ? Explain use of static 10
en
data member and static member function
with the help of an example program in
nm
C++.
BCS-031 2
No. of Printed Pages : 2 BCS-031
BACHELOR OF COMPUTER APPLICATIONS
m
(Revised)
.co
Term-End Examination
O June, 2014
uru
BCS-031 : PROGRAMMING IN C++
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
Note : Question number 1 is compulsory and carries 40 marks.
tG
Attempt any three questions from the rest.
en
1. (a) Explain the basic characteristics of object 8
oriented languages. How is object oriented
programming language better than
nm
BCS-031 1 P.T.O.
2. (a) What is exception handling ? What are the 10
keywords used to handle the exception in
m
C++ ? Write a C++ program to handle
divide by zero exception.
(b) Write a program in C++ using operator 10
.co
template for the binary numbers to perform
a simple arithmetic operations such as add
and subtract.
uru
3. (a) Write a program in C++ that prints 10
numbers and its cubes from 1 to 10 by using
if-then-else and for loop.
(b) Explain the use of continue statement in C++, 5
tG
with example.
(c) Explain how setting of field width and 5
setting of precision may be done in C++.
en
4. (a) Write a C++ program to create vehicle class 10
and derive Car, Truck and Bike classes from
nm
BCS-031 2
No. of Printed Pages : 3 BCS-031
m
BACHELOR OF COMPUTER APPLICATIONS
(Revised)
co
Term-End Examination
00074 December, 2014
.
BCS-031 : PROGRAMMING IN C ++
uru
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
Note : Question no. 1 is compulsory and carries 40
tG
marks. Attempt any three questions from the rest.
en
1. (a) Why did people change over from
structured programming to object-oriented
nm
m
object can be passed as an argument to a
function with the help of an example.
co
2. (a) What do you mean by constructors ? Write
the characteristics of constructors. Write a
.
program to illustrate the use of constructor
uru
in C++ programming. 10
(b) What happens if we don't use the virtual
function in the inheritance ? Explain the
tG
importance of virtual function in the
reference of the above, with the help of an
example. 10
en
3. (a) What are the needs of operator overloading
in the program ? Why can't some operators
nm
differentiation. 10
BCS-031 2
(b) What do you mean by the file stream
m
operations ? Write C++ program to
demonstrate the reading from disk file and
writing the result to the disk file.
co
(c) What is friend function ? Explain its
concept with the help of a suitable
.
example. 3
uru
5. (a) Describe all types of containers that are
available in C++ with their importance, in
tG
detail. 10
BCS-031 3 9,000
No. of Printed Pages : 3 I BCS 031
-
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
Term-End Examination
June, 2015
05723 .
uru
BCS-031 : PROGRAMMING IN C ++
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
ntG
Note : Question no. 1 is compulsory and carries 40
marks. Attempt any three questions from the rest.
me
1. (a) Explain object oriented concepts. How is
object oriented language different from
structured programming language ? 8
(b) What is inheritance ? Explain different
ign
help of an example.
(d) What is an abstract class ? How do you
create an abstract class ? What is the
UA
BCS-031 1 P.T.O.
2. (a) What do you understand by friend
function ? Write a C++ program to find out
m
the sum of n given numbers using friend
function. 10
.co
(b) Explain the difference between private,
protected and public access specifier with
respect to class and its object. Write a
uru
program in this support. 10
ntG
operator-overloading ? List the operators
which cannot be overloaded. Write a C++
program for unary minus (-) operator
overloading. 10
me
(b) Explain the concept of virtual function with
its important characteristics. Write a C++
program to illustrate the importance of
ign
display price. 5
(c) What is function template ? Write a
function template to swap two given
IG
numbers. 10
BCS-031 2
5. (a) What is containership ? Write the
important containers available in C++ with
m
their importance. 10
.co
(b) What do you mean by exception handling ?
Write the syntax of try, throw and catch
expressions. Write a program to catch all
uru
the exceptions in C++ programs. 10
ntG
me
ign
ss
UA
NO
IG
BCS-031 3 6,500
No. of Printed Pages : 3 CI 1Es I BCS-031
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
Term-End Examination
December, 2015
uru
BCS-031 : PROGRAMMING IN C ++
Time : 3 hours Maximum Marks : 100
(iii) \v
(c) Write a C++ program to demonstrate the
use of switch statement. 5
OU
BCS-031 1 P.T.O.
(e) Describe the concept of classes and objects
m
through examples. 5
(f) What are Container Classes ? List the
.co
different types of containers and give three
examples of each.
(g) List any five common examples of
exceptions.
uru
2. (a) Consider an example of declaring the
examination result of BCA students of
ntG
IGNOU. Design three classes : Student,
Exam and Result. The Student class has
data members such as those representing
roll no., name, etc.
e
Create the class Exam by inheriting
nm
BCS-031 2
3. (a) Define friend function. Discuss memory
m
requirements for classes, objects, data
members and member functions with an
.co
example. 10
uru
details : Student Name, Father's Name,
Mother's Name, Student Address, Zip code,
Student Roll No. using constructor and
destructor. 10
4.
ntG
(a) Explain briefly the importance of pure
virtual function in the software
development paradigm. Write a C++
e
program with abstract class having pure
nm
virtual function. 10
(b) Explain exceptions in C++ program
through an example. 10
sig
Multi-Inheritance. 10
BCS-031 3 11,000
No. of Printed Pages : 3 BCS-031
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
Term-End Examination
June, 2016 .
7E;
uru
BCS-031 : PROGRAMMING IN C++
tG
Time : 3 hours Maximum Marks : 100
(Weightage : 75%)
en
Note : Question no. 1 is compulsory and carries 40 marks.
Attempt any three questions from the rest.
nm
m
a C++ program which demonstrates the use
of put( ) — get( ) and read( ) — write( ). 10
.co
(f) Differentiate between information hiding
and encapsulation. 5
uru
local variable in C++ ? Distinguish with an
example.
tG
2. (a) Write a C++ program to demonstrate break
and continue statement. 10
en
(b) Write a C++ program which explains
user-defined stream manipulators. 10
nm
(i) x+y
(ii) x — y
(iii) x * y
OU
(iv) x / y
If any other operator is entered, the
IGN
BCS-031 2
4. (a) What are base and derived classes ? Create
m
a base class called Stack and a derived
class called Mystack. Write an interactive
.co
C++ program to show the operations of a
stack. 10
uru
types of polymorphism with examples. 10
tG
usage of Try, Throw and Catch.
(b) Write a C++ program for finding the
10
en
difference between two times that are
given in 24 hour format. So
nm
BCS-031 5,500
No. of Printed Pages : 3 I BCS-0311
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
Term-End Examination
De December, 2016
uru
BCS-031 : PROGRAMMING IN C++
tG
Time : 3 hours Maximum Marks : 100
(Weightage : 75%)
en
Note : Question no. 1 is compulsory and carries 40 marks.
Attempt any three questions from the rest.
nm
to object-oriented programming ?
m
object-oriented programming. Differentiate
between copy constructor and default
constructor in C++ with the help of an
.co
example. 7
(e) What is function overloading ? Give its
uru
advantages in a C++ program. Also write a
C++ program to show function overloading.
tG
pure virtual function ? Also give an
example of a pure virtual function. 6
en
2. (a) What is exception handling ? What is the
sequence of events when an exception
nm
BCS-031 2
(b) Write a program in C++ to calculate the
factorial of a given number. 5
m
(c) Explain the association of dynamic binding
.co
and run-time polymorphism, with example. 5
uru
5
tG
this class. Also define the methods to show
the title and price of the books.
en
(c) Explain the use of the following operators
in C++ :
(i) &
nm
?:
sig
(iv) &&
BCS-031 3 9,000
No. of Printed Pages : 3 I BCS-031(S) I
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
i u Term-End Examination
December, 2016
uru
BCS-031(S) : PROGRAMMING IN C++
Time : 3 hours
tGMaximum Marks : 100
(Weightage : 75%)
en
Note : Question number 1 is compulsory and carries
40 marks. Attempt any three questions from the
nm
rest.
programming. 6
m
available in C++. 8
.co
the use of setw( ) and setprecision( ) as a
stream manipulator. 5
uru
given number is an even number or an odd
number.
numbers. tG
operator to find the sum of two complex ,
12
en
(b) What is the concept of reusability ? Explain
how a class is derived from a given class in
nm
an example. 10
BCS-031(S ) 2 P.T.O.
5. (a) What is an access specifier ? Explain
m
different types of access specifiers available
in C++. 5
.co
(b) What is dynamic binding ? Explain with
the help of an example. 5
(c) Write a C++ program to define a class
uru
"Account". Derive a "Saving_Account"
class from the Account class. Define
appropriate constructors for both the
classes. Also define a method to display the
tG
account balance. Make necessary
assumptions, if required. 10
en
nm
sig
As
OU
IGN
BCS-031(S) 3 500
No. of Printed Pages : 3 I BC S-031 I
BACHELOR OF COMPUTER APPLICATIONS
m
(BCA) (Revised)
Term-End Examination
.co
June, 2017
uru
Time : 3 hours Maximum Marks : 100
tG
(Weightctge : 75%)
BCS 031
- 1 P.T.O.
(d) Define the Standard Template Library.
How is the class template different from
m
the function template ? Explain. 6
.co
(e) Differentiate between private, protected
and public access modifiers with the help of
an example for each. 6
uru
(f) How is constructor different from the
`constructor with argument' ? Explain by
using an example. 6
2. tG
(a) Write a program to demonstrate the
en
catching of all exceptions. What happens
when a raised exception is not caught by
nm
overloading of « operator. 10
BCS-031 2
(c) Write the general form of the user-defined
manipulators. Design a single manipulator
m
format to provide the following output
specifications for printing float values : 10
.co
(i) 10 column width
(ii) Right Justified
(iii) Two-digit precision
uru
(iv) Filling of unused places with *
(v) Trailing zeroes shown
4.
tG
(a) What is the importance of Abstract Class ?
Write a program to implement the concept
en
of abstract class in C++. Also explain why
an abstract class cannot be instantiated. 10
(b) Write a program to calculate the factorial
nm
BCS-031 3 3,500
No. of Printed Pages : 4 I BCS 031
-
m
(BCA) (Revised)
Term-End Examination
.co
1:316-7 44 O December, 2017
uru
BCS-031 : PROGRAMMING IN C++
tG
(Weightage : 75%)
Note : Question no. 1 is compulsory and carries 40 marks.
en
Attempt any three questions from the rest.
1. (a)
Encapsulation ? How are the two terms
interrelated ? 4
(b) What is a Reference Variable ? What is its
sig
usage ?
(c) Identify the errors in the following code
As
segment : 4
int main( )
OU
BCS-031 1 P.T.O.
(d) Why will the function given in the
following code fragment not work ? What
m
should be done to make it work ?
int main( )
.co
float sum (float, float);
uru
void calc(void)
tG
en
float x, y, s;
cin » x » y
nm
4
(g) What do you understand by a Default
Constructor ? How is a default constructor
IGN
m
overloading.
(i) When should one derive a class publicly or
.co
privately ? Give a suitable example in
support of your answer.
(j) What are Iterators ? List the five types of
uru
iterators supported by STL in C++. 4
m
the usage of these concepts with suitable
10
.co
example code in C++.
(b) What is an Exception in C++ ? Explain how
exception handling is done in C++ with the
uru
help of a program. What will happen if
exception is thrown outside of a try block ?
Give reasons for such a happening. 10
5. tG
(a) Write a program in C++ to create a class
en
Employee with basic data members such as
name, address, age. Create a class
Part_time employee which inherits from
nm
employee. 10
BCS-031 4 15,000
No. of Printed Pages : 4 BCS-031(S)
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
0 02 5 4 Term-End Examination
December, 2017
BCS 031(S) : PROGRAMMING IN C++
uru
-
ntG
Note : Question number 1 is compulsory and carries
40 marks. Attempt any three questions from the
rest.
me
int ch = 20;
cout « ++ch « "\ n"
OU
« ch « "\n";
(i) What output does the above code
fragment produce ?
IGN
BCS-031(S) 1 P.T.O.
(d) Identify the problem with the following
m
code. Suggest the way to correct the
problem. 4
void large (int &a, int &b);
.co
int main( )
{ large (5, 7); }
uru
void large (int &a, int &b)
{ if (a > b)
a = —1;
else
b = —1; } ntG
(e) What are inline functions ? Give the
advantages and disadvantages of an inline
me
function. 4
(0 How is the working of a member function
different from a friend function and a
n
non-member function ? 4
sig
BCS-031(S) 2 P.T.O.
2. (a) What is Abstract Class ? Explain the use of
abstract class in C++, with the help of an
m
example program. 10
.co
(b) What is an Exception ? Explain briefly
about the exception handling process while
executing constructors and destructors.
uru
Also explain with an example, how
exception types are specified in a C++
program. 10
3.
following : 5 tG
(a) Differentiate between any two of the
en
(i) ios : : ate and ios : : app
(ii) Binary file and Text file
nm
m
file and insert the text "File program in
C++" at the end of it. Your program should
have suitable comments for each line of
.co
code. 10
uru
complex numbers. In this program you
need to create a complex class and define a
proper constructor for object initialization. 10
tG
en
nm
sig
As
OU
IGN
BCS-031(S) 4 500
No. of Printed Pages : 3 B CS 031
- I
m
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.co
05405 Term-End Examination
uru
June, 2018
Time : 3 hours
ntG Maximum Marks : 100
(Weightage : 75%)
Note : Question no. 1 is compulsory and carries 40 marks.
me
m
program in C++ to define a class "Teacher's
with a virtual function "Salary". Derive
.co
class "Associate-Professor" from class
teacher and implement the salary function. 10
uru
(f) What is encapsulation ? Are encapsulation
and information hiding the same ? Explain. 5
(i) a constructor
As
m
is implemented iii C++, with the help of an
example program. 10
.co
(b) What is a template class ? Create a
template class for stack data structure. 10
uru
5. (a) What are containers ? Explain the use of
,
(b)
example.
ntG
What is an exception ? How is it handled in
6
(i) Destructor
(ii) Inline function
si
As
OU
IGN
BCS-031 3 6,000
No. of Printed Pages : 2 BCS-031(S)
m
BACHELOR OF COMPUTER APPLICATIONS
.co
(BCA) (Revised)
Term-End Examination
December, 2018
uru
BCS-031(S) : PROGRAMMING IN C++
with an example. 8
(d) Write a program in C++ to demonstrate the
OU
m
advantage with an example. 6
(b) Write a C++ program to find out the sum of
.co
n numbers, by defining proper class,
constructor and methods. 10
uru
(c) Explain the use of nested if statement
with the help of an example. 4
(b)
ntG
function. Write the purpose of each.
Write a C++ program to demonstrate how
8
of an example. 10
(b) What is copy constructor ? Illustrate the
use of copy constructor with help of a
As
program in C++. 10
BCS-031(S) 2 8,000
1169002
m
No. of Printed Pages : 4 BCS-031
.co
Bachelor of Computer Applications
(BCA) (Revised)
Term-End Examination
uru
June, 2019
BCS-031 : PROGRAMMING IN C++
Time : 3 Hours
ntG Maximum Marks : 100
(Weightage 75%)
me
Note : Question No. 1 is compulsory and carries
40 marks. Attempt any three questions from
the rest.
ign
(A..27) P. T. 0.
[2] BCS-031
m
explain general rules of operator
overloading.
.co
5
(e) What is stream manipulator ? Explain the
use of setw( ) and setprecision( ) as stream
uru
manipulator. 5
(f) What is an object in C++ ? Explain, how an
object can be passed as an argument to a
ntG
function, with the help of an example.
(g) What is scope resolution operator ? Explain
the use of scope resolution operator with
5
me
the help of a C++ program. 5
(h) Explain any five relational operators in
C++ with the help of examples. 5
ign
(A-27)
I3/ BCS-031
m
3. (a) What do you mean by operator-overloading
in C++ ? List the operators which cannot
.co
be overloaded. Write a program in C++, to
overload unary minus (—) operator. 10
(b) What is exception handling ? What are the
uru
keywords, used to handle the exception in
C++ ? Write a C++ program to handle
divide by zero exception. 6
ntG
(c) How is structure different from a class ?
Explain with example. 4
me
4. (a) What is static member ? Explain the use of
static data member and static member
function, with the help of an example
ign
program in C++. 7
(b) Explain the use of the following standard
stream objects with the help of examples :
ss
8
(i) cin
UA
cout
cerr
NO
(iv) clog
(c) What is function template ? Explain this
IG
m
5. Write short notes on the following (give
example code in C++ for each) : 5 each
.co
(a) Overriding concept in C++
uru
(c) Encapsulation
ntG
me
ign
ss
UA
NO
BCS--031 • 5,500
IG
(A-27)
M06874
m
No. of Printed Pages : 2
I BCS-031 I
co
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
.
uru
Term-End Examination,
December 2019
BCS-031 : PROGRAMMING IN C++
Time : 3 Hours]
ntG [Maximum Marks : 100
(Weightage : 75%)
Note : (i) Question No. 1 is compulsory and carries 40 marks.
me
(ii) Attempt any three questions from the rest.
co
function template? Give example for each. 8
b) What are Inline functions? Discuss their importance
in programming. Write an example program in C++
.
to clarify the concept of Inline functions. 8
uru
c) What is Polymorphism? Give three advantages of
polymorphism. 4
ntG
3. a) Discuss the role of virtual functions in inheritance.
What happens if we don't use virtual functions in
inheritance? Give suitable example in support of
your discussion. 10
b) What are File stream operations? Write a program
me
in C++ to demonstrate the file reading and writing
operations. 10
help of an example. 4
a) Code Reusability
b) 'this' pointer
c) Containers and its types in C++
IG
d) Stream manipulators
4 44.000.
m
BCS-031
.co
No. of Printed Pages : 4
BACHELOR OR COMPUTER
uru
APPLIATIONS (BCA) (REVISED)
Term-End Examination
tG
June, 2020
en
BCS-031 : PROGRAMMING IN C++
nm
Weightage : 75%
the rest.
OU
paradigm. 5
P. T. O.
m
[2I BCS-031
.co
from information hiding ? Explain with the
help of an example. 5
uru
(c) Explain the concept of copy constructor
tG
(d) What is access control specifier ? Explain
en
public access control specifier with
nm
example. 4
stream manipulator. 6
OU
.co
types of container in C++. Also list some
uru
class. 10
tG
the use of static data member and static
10
P. T. O.
m
[4] BCS-031
.co
the utility of message passing with the
uru
(b) Write a program in C++ to add two 3 x. 3
tG
destructor and methods in the program. 12
en
5. (a) Write a program in C++ to open an existing
BCS-031 3,030
No. of Printed Pages : 4 BCS-031
om
BACHELOR OF COMPUTER
APPLICATIONS (B. C. A.) (REVISED)
u.c
Term-End Examination
December, 2020
ur
BCS-031 : PROGRAMMING IN C++
Time : 3 Hours
tG Maximum Marks : 100
en
Weightage : 75%
Note : Question number 1 is compulsory and
m
numbers. 5
Lot-I P. T. O.
[2] BCS-031
om
a class ? Explain with the help of
example. 5
u.c
object can be passed as an argument to a
function with the help of an example. 5
ur
(f) What is friend function ? Explain its
tG
advantages with the help of an example. 7
om
different from function overriding ?
u.c
each. 10
ur
in C++ to create a class Doctor with a
tG
virtual function salary. Derive a class
P. T. O.
[4] BCS-031
om
(i) Copy constructor
u.c
(iii) Stream manipulators
ur
(v) Scope resolution operator
tG
en
m
ign
ss
UA
NO
IG
BCS–031
No. of Printed Pages : 4 BCS-031
om
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
Term-End Examination
.c
June, 2021
ru
BCS-031 : PROGRAMMING IN C++
u
Time : 3 hours Maximum Marks : 100
tG
(Weightage : 75%)
BCS-031 1 P.T.O.
(f) What is Function Overloading ? How are
function calls matched with overloaded
om
functions ? Explain with the help of an
example. 5
.c
(g) Compare Early Binding and Late Binding.
Explain when to use which type of
ru
binding. 5
u
(h) What are Exceptions in C++ ? How is
exception handling done in C++ ? Briefly
tG
discuss the functioning of Try, Throw and
Catch expressions with suitable block
en
diagram. 5
m
2. (a) Briefly discuss the term Message Passing.
How does message passing support the
ign
BCS-031 2
3. (a) What is a Static Member Function ? Write
a program in C++ to illustrate the concept
om
of the static member function. 5
.c
naming conventions of destructor. Do
constructors and destructors have return
ru
type ? 5
u
access specifiers in C++. 5
tG
(d) Explain the use of ‘&&’ and ‘!’ operators in
C++ with the help of an example. 5
en
4. (a) What is Inheritance ? What are the
m
advantages of inheritance ? Explain with
the help of example. 5
ign
manipulators. 5
BCS-031 3 P.T.O.
(b) Compare Class templates and Function
om
templates with the help of example code. 5
.c
Constructor
ru
(ii) Virtual Functions and their
limitations
u
tG
en
m
ign
ss
UA
NO
IG
BCS-031 4
[2] BCS-031
o m
(c) Compare structures and classes in C++.
Term-End Examination
.c
What are empty classes ? Explain the
u
December, 2021
u r
purpose of empty classes. 5
nt G
(d) What are static members of a class ? What
Weightage : 75%
A s
40 marks. Attempt any three questions from characteristics of a constructor. What are
the rest.
G N
1. (a) What are the essential properties of object (f) What is operator overloading ? Why some
oriented
I
oriented programming ? How does object
P. T. O.
[3] BCS-031 [4] BCS-031
(g) What is STL ? Briefly discuss the 3. (a) What is a friend function ? Write a
friend function. 5
2. (a) What do you understand by the signature of
.c
an example program. 5
u
the signature of a method. 5
e
(d) Explain the role of destructors in C++
(c) Discuss the taxonomy of C++ data types
m
memory management. Write a program
n
with the help of a suitable block diagram. 5
g
in C++ to demonstrate the use of
(d) What are Breaking Statements ? Give
s i destructors. 5
syntax of the following
s
breaking
O U 5
inheritance in C++ with the help of an
N
(i) break
example. 5
(ii) continue
(iii) goto
I G (b) Compare multiple inheritance with
P. T. O.
[5] BCS-031
o m
.c
overriding, with the help of suitable
r u
5. Write short notes on the following : 5×4=20
Gu
(a) File Stream Operations
nt
(b) Inline Functions
e
(c) Exception Handling
n m
(d) Class Templates
P. T. O.
No. of Printed Pages : 3 BCS-031
om
BACHELOR OF COMPUTER APPLICATIONS
(BCA) (Revised)
Term-End Examination
.c
June, 2022
ru
BCS-031 : PROGRAMMING IN C++
u
Time : 3 hours Maximum Marks : 100
tG
(Weightage : 75%)
Note : Question no. 1 is compulsory and carries 40 marks.
en
Attempt any three questions from the rest.
programming. 5
BCS-031 1 P.T.O.
(f) How does virtual function differ from a
om
pure virtual function ? Explain with the
help of an example. 5
.c
and runtime polymorphism, with suitable
example. 5
ru
(h) Explain the concept of Inline function in
u
C++, with suitable example. 5
tG
2. (a) Write a program in C++ to define a class
en
‘‘Teacher’’ with a virtual function ‘‘Salary’’.
Derive the class ‘‘Assistant Professor’’ from
the class ‘‘Teacher’’ and implement the
m
assumptions. 10
BCS-031 2
4. (a) Write a program in C++ to open an existing
file and insert the text ‘‘File program in
om
C++’’ at the end of the file. Your program
should have suitable comments. 10
.c
(b) Write a program in C++ to multiply two
complex numbers. In this program you
ru
need to create a complex class and define a
proper constructor for object initialization.
u
Give suitable comments in your program. 10
tG
5. (a) Differentiate between the following :
en 5
(i) Binary file and Text file
(ii) get( ) and getline( )
m
(b) What is stream in C++ ? Name the streams
generally used for file I/O. 4
ign
an example. 4
example. 7
IG
BCS-031 3 P.T.O.
No. of Printed Pages : 4 BCS-031
om
BACHELOR OF COMPUTER
APPLICATIONS (BCA) (REVISED)
u.c
Term-End Examination
ur
December, 2022
BCS-031 : PROGRAMMING IN C++
Time : 3 Hours
tGMaximum Marks : 100
en
Weightage : 75%
m
the rest.
ss
5
NO
example. 5
P. T. O.
[2] BCS-031
om
list container class with the help of an
example. 5
u.c
default constructor in C++, with the help of
an example for each. 5
ur
(e) “Abstract class provides a base, upon
which other classes may be built.” Justify
the statement,
tG with the help of an
en
example. 5
of an example program. 5
UA
of a program. 10
[3] BCS-031
om
advantages of class template. Create a
class template for a linked list data
structure. 10
u.c
3. (a) What is operator overloading ? Write a C++
program to overload ‘+’ operator to find the
ur
sum of two complex numbers. Support your
tG
program with suitable comments. 10
10
implemented in C++. 10
P. T. O.
[4] BCS-031
om
for each : 4 each
u.c
(ii) Message passing
ur
(iv) Destructors and their need
tG
(v) Relational operators in C++
en
m
ign
ss
UA
NO
IG
BCS–031
No. of Printed Pages : 4 BCS-031
o m
BACHELOR OF COMPUTER
u.c
APPLICATIONS (BCA) (REVISED)
Term-End Examination
ur
June, 2023
tG
en
BCS-031 : PROGRAMMING IN C++
the rest.
UA
P. T. O.
[2] BCS-031
m
oriented programming over structured
programming with example. 5
o
(d) What is the utility of friend function ? Does
u.c
it violate the rule of encapsulation ? 5
ur
late binding with an example of each. 5
tG
(f) What are constructors in C++ ? Mention
their five characteristics. 5
en
(g) What is Runtime Polymorphism ? Explain
its utility with the help of an example. 5
m
an example. 5
[3] BCS-031
m
overloading and method overriding with
example. 5
o
u.c
3. (a) What is inheritance ? Explain, how
inheritance is implemented in C++. 5
ur
(b) How do inline functions provide efficiency
during runtime ? Explain. 5
help of an example. 5
UA
P. T. O.
[4] BCS-031
m
and global functions with help of an
example. 5
o
(d) How is memory allocation done in C++
u.c
when a class is declared and a class is
instantiated ? Explain with the help of an
ur
example. 5
tG
5. (a) What is the role of copy constructor ?
Illustrate the cases when it is invoked. 5
en
(b) What are private constructors and
m
destructors ? How are they different from
constructors and destructors which are not
ign
private ? Explain. 5
BCS–031