Question Papers C++
Question Papers C++
5 (a Write a Ctt program to demonstrate class and.object. (Unit-l, Page No. 38, Q22)
(b) Discuss about call by reference with examples. (Unit-il, Page No. 47, Q35)
6 (a) Write a program to implement friend function. (Unit-ll, Page No. 58, Q10)
(b) Explain types of constructors. (Unit-l, Page No. 61, Q15)
OR
7 (a) Explain about copy constructors in detail with suitable example. (Unit-lil, Page No. 64, Q19)
(b) What is destructor? Write a program to implement destructors? (Unit-Hl, Page No. 65, Q21)
8. (a) Explain operator overloading with program. (Unit-N, Page No. 82, Q19)
(b) Explain the concept of binary operator overloading. (Unit-V, Page No. 84, a21)
OR
9. (a), Discuss bow to declare and access pointers to objects. (Unit-N, Page No. 90, Q28)
(b) Explain the use of "this' pointer with the help of an example. (Unit-IV, Page No. 91, Q29)
10. What is a template? Also give the classification of templates. (Unit-V, Page No. 102, Q16)
OR
11. . (a) Explain about exceptions and its types. (Unit-V,Page No. 105, Q21)
(b) Explain in detail about catching mechanism. (Unit-V, Page No. 107, Q25)
e SIA PUBLISHERS AND DISTRIBUTORS PVT. LTD.
FACULTY OF INFORMATICS
B.C,A, -Yoar l1-Semester (CBCS) Examinatlon
November-2020
OBJICT ORIENTED PROGRAMMING USING CPP
Time: 2 Hours Max. Marks: 70
PART-A(3* 2= 10 Marks )
Note: Answer any Hve questions.
List the storage classes.
Solutions
1.
(Unit-4, Page No. 4, Q9)
2 What arce derived data types?
(Unit-1, Page No. 4, Q10)
3. What is call by reference? (Unit-l, Page No. 29, Q9)
4. Write the syntax of nested-if statement with
example. (Unit-l, Page No. 28, Q2)
5. What is constructor?
(Unit-l, Page No. 56, Q4)
6. Define function with example. (Unit-ll, Page No. 29, Q7)
7. What is hybrid inheritance? (Unit-V, Page No. 72, Q4)
8 What are the rules of operator overloading? (Unit-V, Page No. 73, Q7)
9. What is template? (Unit-V, Page No. 98, Q4)
10. What is the difference between error and exception? (Unit-V, Page No. 99, Q10)
PART-B(4*15 =60 Marks )
Note: Answer any Four questions.
11. (a) Explain about operators in Ct+. (Unit-l, Page No. 16, Q32)
(b) Explain about basic OOP's concepts. (Unit-i, Page No. 7, Q16)
12. (a) Write the differences between procedure oriented programming and
object oriented programming? (Unit-l, Page No. 6, Q15)
(b) Explain about memory management operators. (Unit-l, Page No. 21, Q36)
13. (a) Explain do-while loop with example program. (Unit-li, Page No. 35, Q17)
(b) Write aC+ program to demonstrate class and object. (Unit-ll, Page No. 38, Q22)
14. (a) Write a program to implement inline function. (Unit-l, Page No. 48, Q37)
(b) Write a short note on arrays. (Unit-I, Page No. 41, Q25)
1s. (a) Write a program to implement friend function. (Unit-ll, Page No. 57, Q10)
(b) Write a short note on function overloading. (Unit-lll, Page No. 57, Q9)
16. (a) What is Destructor? Write a program to implement Destructors. (Unit-lIl, Page No. 65, Q21)
(b) Explain about dynamic constructors. (Unit-ll, Page No. 64, Q20)
17, What is inheritance? Explain the types of inheritance. (Unit-IV, Page No. 75, Q11)
18. Discuss the following,
(a) Pointers (Unit-V, Page No. 86, Q22)
(b) Overloading unary operators. (Unit-V, Page No. 83, Q20)
19,
(a) What is polymorphism? Write aprogram to implement nunime polymorphisn. (Unit-V, Page No. 100, Q013)
(6) Explain about function template. (Unit-V, Page No. 103, Q17)
20
(a)Write a program to implement class templates. (Unit-V, Page No. 104, Q19)
(0) Write aboutexception handling. (Unit-V, Page No. 106, Q22)
Warnlng 7XeroxlPhotocopylny of thlsbook is a CRIMINAL act, Anyone found guilty is LIABLE to face LEGAL proceedings.
PROGRAMMING USING CPD
OP.2 OBJECT ORIENTED
FACULTY OF INFORMATICS
Examination
B.C.A. I|-Semester (CBCs) (Main &Backlog) (New)
December-2021
FACULTY OF INFORMATICS
B.C.A. II-Semester (CBCS) (New) (Main &
Backlog)Examinatlon
July - 2022
OBJECT ORIENTED
Time: 3 Hours
PROGRAMMING U8ING CPP
Max. Marks: 70
Note: () Answer all questions from PART-A and any five
questlons from PART-B,
Choosingone question from each unit.
(i) Missing data, If any, may be
suitably assumed.
PART-A (10 x2= 20 Marks ) Solutions
1. (a) What is the need for OOPs?
(Unit-1, Page No. 2, Q3)
(b).What are the keywords in C++?
(Unit-i, Page No. 3,Q7)
(c) Describe about goto statement.
(Unit-ll, Page No. 28, Q3)
(d) Describe the default arguments.
(Unit-ll, Page No. 29, Q10)
(e) What is a function?
(Unit-ll, Page No. 29, Q7)
() Definea constructor.
(Unit-lll, Page No. 56, Q4)
(g) What is inheritance?
(Unit-IV, Page No. 72, Q1)
(h) Define a pointer. (Unit-1V, Page No. 73, Q8)
) What is polymorphism? (Unit-V, Page No. 98, Q1)
Describe about exception handling. (Unit-V, Page No. 99, Q6)
PART-B(5x 10 =50 Marks )
Unit-I
2 (a) List and explain about 0OP concepts. (Unit-1, Page No. 7, Q16)
(b) Elaborate the structure of C++ in detail. (Unit-i, Page No. 9, Q21)
OR
3. (a) Discuss in brief about storage classes in C++. (Unit-1, Page No. 13, Q27)
(b) Illustrate about memory management operators in C+t. (Unit-l, Page No. 21, Q36)
Unit-II
4, (Unit-ll, Page No. 33, Q15)
(a) Explain about switch statement with example.
(b) Illustrate about arrays within class in detail.,; (Unit-ll, Page No. 42, Q26)
OR
(a Elaborate the static data members with examples. (Unit-ll, Page No. 43, Q28)
(6) Di_cuss about callby reference with examples. (Unit-l, Page No. 47, Q35)
Warning :)Xerox/Photocopying of this book is a CRIMINAL Act.Anyone found guilty is LIABLE to face LEGAL proceedings.
OP.4 OBJECT ORIENTED PROGRAMMING USING CRR
Unit-III
6. (a) Explain about functions in detail. (Unit-ll, Page No. 46, Q32)
(b) Explain the use of friend function with suitable example. (Unit-lll, Page No. 57,Q10)
OR
7 (a) Elaborate the parameterized constructors with example. (Unit-, Pge No. 62, a0)
(b) Iilustrate about dynamic constructors in brief. (Unit-M, Page No. 64, 029)
Unit-IV
(a) Explain about multiple inheritance with example. (Unit-N, Page No. 79, Q18)
(b) Elaborate the overloading unary operators with examples. (Unlt-N, Page No. 83, Q20)
OR
9 a) Write a C+ program to swap two numbers using pointers. (Unit-N, Page No. 88, Q2)
(b) Illustrate about arrays of pointers with examples. (Unit-N, Page No. 89, 27)
Unit-V
10. (a) Explain about compile-time polymorphism with examples. (Unit-V, Page No. 100,Q12)
(b) Elaborate briefly about function témplates. (Unt-V, Page No. 103, Q17)
OR
11. (a) Illustrate about exception handling mechanism in brief. (Unit-V, Page No. 106, C22)
(b) Explain about how to throw an exception in detail. (Untt-V, Page No. 107, 024)
3 (a) What is the need data types in C++? Describe various data types in Ctt along with their representa
tions and sizes.
Unit-II
4. (a) Differentiate between while and do-while with necessary examples.
(b) Explain class objects. With the help of example explain how data hiding and encapsulation character
istics are achieved in C++.
OR
Unit-IV
8 (a) Explain multiple inheritançe with an example.
(b) Explain hierarchical inheritanc with an example.
OR
9 (a) Write a C++ program to overload binary operator.
(b) Briefly explain arrays of pointers with an example program.
Unit-V
10. (a) Discuss about run-time Polymorphisim with example.
(b) Explain in detail about virtual function with example.
OR
11. (a) Write a C++ program to implement class template.
(b) Explain try, catch and throw mechanism of C++ exceptional handling.
do SIA
PUBLISHERS AND DISTRIBUTORS PVT. LTD.