You are on page 1of 2

14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 Roll No.


14149 14149 14149 14149 14149 Total14149
No. of Pages
14149 : 02 14149

Total No. of Questions : 09


B.Tech.(Electronics Engg./3D Animation & Graphics) (2012 Onwards)
14149 B.Tech.(CSE/ECE/Electronics
14149 14149 14149 & Computer
14149 Engg./ETE/IT)
14149 14149(2011 Onwards)
14149 14149
(Sem.–3)
OBJECT ORIENTED PROGRAMMING USING C++
14149 14149 14149
Subject Code
14149 14149
: BTCS-305
14149 14149 14149 14149
Paper ID : [A1129]
Time : 3 Hrs. Max. Marks : 60

m
14149 14149 14149 14149 14149 14149 14149 14149 14149
INSTRUCTIONS TO CANDIDATES :

o
1. SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
each.

.r c
14149
2.
14149
SECTION-B
14149
contains14149
FIVE questions
14149
carrying FIVE marks
14149
each and 14149
14149
students 14149
have to attempt any FOUR questions.
3. SECTION-C contains T HREE questions carrying T EN marks each and students

14149 14149 14149

pe
have to attempt any T WO questions.
14149 14149 14149

o m
14149 14149 14149

p a SECTION-A

.r c
1.

r
Write briefly :

e
14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 14149
b
14149 14149 14149

a p
1. Draw flow chart to find the largest of three numbers.
14149 14149 14149 14149

rp
2. Why are classes in C++ called Abstract Data Types?

3. Explain the difference between abstraction & data hiding.


14149 14149 14149 14149

b
14149 14149

4. Why are classes in CPP called Abstract Data Types?


14149 14149 14149

14149 14149
5. Explain
14149
the use of14149
get & put pointer
14149
in file handling.
14149 14149 14149 14149

6. Explain how memory is allocated to classes & objects.

14149 14149 14149 14149 14149 14149 14149 14149 14149


7. Distinguish between static members & variables. How are they useful?

8. What are virtual constructors? Give relevant examples to explain it.


14149 14149 14149 14149 14149 14149 14149 14149 14149
9. What are static functions? Explain how friendship function is used in C++.

10. What are the various input statements of C++?


14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 1 | M-56595
14149 14149 14149 14149 14149 14149 (S2)-458
14149 14149

14149 14149 14149 14149 14149 14149 14149 14149 14149


14149 14149 14149 14149 14149 14149 14149 14149 14149

SECTION-B
14149 14149 14149 14149 14149 14149 14149 14149 14149

2. What is a constructor and destructor? What is the use of default & copy constructors? Is a
constructor mandatory for a Class? Explain by giving examples in each case.
14149 14149 14149 14149 14149 14149 14149 14149 14149
3. Explain how base class member functions can be invoked in a derived class if the derived
class also has a member function with the same name.
14149 14149
4. What is14149 14149
a virtual function? 14149
Explain its 14149
usage with example. 14149 14149 14149

5. What are the various File Opening modes? How is (ios::app) mode different from
(ios::ate14149
mode)?

m
14149 14149 14149 14149 14149 14149 14149 14149

6.
o
Explain what is overloaded operator & how does a compiler proceed to execute an

.r c
overloaded operator.
14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 14149 14149

pe
14149 SECTION-C
14149 14149

o m
14149 14149 14149

7.
a .r c
Write a program to copy the content of a data file to another file. Make use of the

p
exception handling conditions also.

r e
14149 14149 14149 14149 14149 14149 14149 14149 14149

b p
8. Write a class to represent a vector (a series of float values). Include member functions to
perform the following tasks:
14149 14149 14149 14149 14149

a 14149 14149 14149 14149

rp
a) To create the vector

b
b) To modify the value of a given element
14149 14149 14149 14149 14149 14149 14149 14149 14149

c) To multiply by a scalar value

14149 14149 d) To display


14149 the vector in the form 14149
14149 (10, 20, 30,...) 14149 14149 14149 14149

Write a program to test your class


14149 14149 14149 14149 14149 14149 14149 14149 14149
9. Write a program to overload the plus operator to add two complex numbers.

14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 14149 14149 14149 14149 14149 14149 14149 14149

14149 2 | M-56595
14149 14149 14149 14149 14149 14149 (S2)-458
14149 14149

14149 14149 14149 14149 14149 14149 14149 14149 14149

You might also like