CU SEC-A-2 Object Oriented Programming in C++, 2025

University of Calcutta question paper, B.Sc. General Semester V, 2025. Object Oriented Programming in C++. Typed in LaTeX, searchable, with a printable PDF.

Open this paper in MathQP

  1. When is the default copy constructor called?
  2. The members of a class are by default
  3. Which Keyword is used to declare a friend function or a friend class?
  4. What are the values of x, y and z ? texttt int x, y = 10, z = 15; texttt x = ++y + z++;
  5. What is the output of the following program? main() int x = 3, y = 0; if (x != y) printf ("Not Equal"); else printf("Equal");
  6. Which Keyword is used to access the variable in namespace?
  7. Loop defines
  8. Can a friend function be inherited by derived class?
  9. Break keyword is used to
  10. Find the output of the following programs : #include<iostream> #inculde<string> using namespace std; int main (int argc, char const*argv[]) char s1[6] = "Hello"; char s2[6] = "World"; char s3[12] = s1+" "+s2; cout <<s3 return 0;
  11. Develop a program in C++ to read a set of five real numbers from the keyboard and to find out their sum and average.
  12. Discuss the merits and demerits of Object-oriented methodologies.
  13. What is inheritance? Give suitable example for inheritance.
  14. Write a program in C++ to count the number of words in a line of text.
  15. Write a program in C++ to check if given number is prime or not.
  16. Write the difference between High-Level Language and Low-Level Language.
  17. Write a program in C++ to read a two dimensional square matrix A and display its transpose.
  18. What is an object and how objects can be defined in C++?
  19. What are constructors and destructors? Explain how they differ from normal functions.
  20. Write a program in C++ that prints all primes less than 100 .
  21. Write a C++ program to generate a Fibonacci series of ‘ n ' numbers, where n is defined by a programmer.
  22. Write a program in C++ using operator overloading to find a factorial of a given number.
  23. List the merits and demerits of single inheritance over multiple inheritance.
  24. Explain Polymorphism in C++ with example.
  25. to read a set of integers.
  26. to read a set of double numbers individually.
  27. What is a template? List the merits and demerits of using a template in C++.
  28. List the merits and demerits of defining an exception handler in an object oriented programming.
  29. What are the advantages of using exception handling mechanism in a program?
  30. Write an object oriented program in C++ that prints the factorial of a given number using a copy constructor and destructor member function.
  31. What is namespace in C++? What is the correct syntax of defining a namespace?