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

  1. Which of the following operator can be overloaded through friend function?
  2. Maximum number of template arguments in a function template is
  3. What is the output of the following program? # include <iostrem.h> Void main() float x = 5, y = 2; int result; result = x cout result;
  4. A copy constructor takes
  5. Declaration of a pointer reserves memory space
  6. The ability of a function or operator to act in different ways on different data types is called as
  7. By default, all members in a class are .
  8. What is the benefit of C++ input and output over C input and output?
  9. A class defined within another class is
  10. The derivation of Child class from Base class is indicated by symbol.
  11. What is object oriented programming? List out benefits of object oriented programming.
  12. What are the differences between C and C++? Write down some application of object-oriented programming.
  13. Describe various operators used in C++.
  14. Explain enumeration data type with an example.
  15. Write a C++ program to compute the greatest common divisor of two integers.
  16. What is the difference between ‘call by value’ and ‘call by reference’?
  17. Write a C++ program that uses a function to print whether the given positive number is prime or not.
  18. Explain the differences between class and object in object oriented programming language.
  19. 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.
  20. 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.
  21. Explain destructor with an example.
  22. What is constructor? List out characteristics of constructors.
  23. How does polymorphism promote extensibility? Explain various types of polymorphism with example.
  24. What is friend function? Explain with example.
  25. Explain class template. How many types of templates are there in C++?
  26. What is the difference between error and exception? Explain what are the different types of exceptions.
  27. What is the use of copy constructor? Explain the concept of copy constructor with the help of a suitable example.
  28. What is namespace in C++? Write the syntax of defining a namespace.
  29. Why is it important to write “using namespace std” in C++ program?
  30. What is exception handling? Explain how to handle an exception with appropriate example.
  31. Write a C++ program to swap two numbers.
  32. Write a C++ program to create a template to find the maximum value stored in an array.