BCS-031 Programming in C++ Solved Assignment 2021-22
|Course Title||Programming in C++|
|Submission Date||31st October 2021 for July 2021
15th April 2022 for January 2022
- Complete Assignments
- Lowest Price
- Secure Payments
(a) What is Object Oriented Programming (OOP) approach? Explain advantages of OOP.
(b) Briefly explain different operators of C++.
(c) Explain use of followings in C++ programming, with an example program for each.
(a) for loop
(b) while loop
(a) What is a class? Explain how a class is created in C++, with the help of an example.
(b) Explain the following in detail, in context of C++ programming.
i. Access specifies
ii. Friend Function
(c) Write a C++ program to explain how an object can be passed as a parameter to a function.
(a) What are containers? Explain use of List container class, with the help of an example.
(b) What is inheritance? What are different types of inheritance? Explain how multiple inheritance is implemented in C++, with the help of a program.
(c) Write a C++ program to overload ‘+’ operator in such a way that it return the sum of lengths of two strings (Note: if S1 and S2 are two strings then S1+S2 or S2 + S1 should give the sum of lengths of S1 and S2).
(a) Explain the following in detail with the help of examples, in context of C++ programming
ii. Virtual Function
iii. Inline function
(b) What is template? Write appropriate statements to create a template class for Stack data Structure in C++.
(a) What is exception? How exceptions are handled in C++? Write program to handle stack overflow as exception.
(b) What is function overloading? Write a C++ program to explain concept of function overloading.
(c) Explain use of any two I/O formatting flags in C++ with example.