CU SEC-A-2 Object Oriented Programming in C++, 2021
University of Calcutta question paper, B.Sc. General Semester V, 2021. Object Oriented Programming in C++. Typed in LaTeX, searchable, with a printable PDF.
Open this paper in MathQP
- Which of the following operator can be overloaded through friend function?
- Maximum number of template arguments in a function template is
- What is the output of the following program? # include <iostrem.h> Void main() float x = 5, y = 2; int result; result = x cout result;
- A copy constructor takes
- Declaration of a pointer reserves memory space
- The ability of a function or operator to act in different ways on different data types is called as
- By default, all members in a class are .
- What is the benefit of C++ input and output over C input and output?
- A class defined within another class is
- The derivation of Child class from Base class is indicated by symbol.
- What is object oriented programming? List out benefits of object oriented programming.
- What are the differences between C and C++? Write down some application of object-oriented programming.
- Describe various operators used in C++.
- Explain enumeration data type with an example.
- Write a C++ program to compute the greatest common divisor of two integers.
- What is the difference between ‘call by value’ and ‘call by reference’?
- Write a C++ program that uses a function to print whether the given positive number is prime or not.
- Explain the differences between class and object in object oriented programming language.
- What do you mean by operator overloading in C++? List the advantages of this feature. What are the limitations of operator overloading? Write a C++ program to generate Fibonacci sequence using overloading of increment operator.
- What is inline function? How does it differ from normal function? Write a C++ program to calculate area and circumference of a circle using inline function.
- Explain destructor with an example.
- What is constructor? List out characteristics of constructors.
- How does polymorphism promote extensibility? Explain various types of polymorphism with example.
- What is friend function? Explain with example.
- Explain class template. How many types of templates are there in C++?
- What is the difference between error and exception? Explain what are the different types of exceptions.
- What is the use of copy constructor? Explain the concept of copy constructor with the help of a suitable example.
- What is namespace in C++? Write the syntax of defining a namespace.
- Why is it important to write “using namespace std” in C++ program?
- What is exception handling? Explain how to handle an exception with appropriate example.
- Write a C++ program to swap two numbers.
- Write a C++ program to create a template to find the maximum value stored in an array.