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
- When is the default copy constructor called?
- The members of a class are by default
- Which Keyword is used to declare a friend function or a friend class?
- What are the values of x, y and z ? texttt int x, y = 10, z = 15; texttt x = ++y + z++;
- What is the output of the following program? main() int x = 3, y = 0; if (x != y) printf ("Not Equal"); else printf("Equal");
- Which Keyword is used to access the variable in namespace?
- Loop defines
- Can a friend function be inherited by derived class?
- Break keyword is used to
- 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;
- Develop a program in C++ to read a set of five real numbers from the keyboard and to find out their sum and average.
- Discuss the merits and demerits of Object-oriented methodologies.
- What is inheritance? Give suitable example for inheritance.
- Write a program in C++ to count the number of words in a line of text.
- Write a program in C++ to check if given number is prime or not.
- Write the difference between High-Level Language and Low-Level Language.
- Write a program in C++ to read a two dimensional square matrix A and display its transpose.
- What is an object and how objects can be defined in C++?
- What are constructors and destructors? Explain how they differ from normal functions.
- Write a program in C++ that prints all primes less than 100 .
- Write a C++ program to generate a Fibonacci series of ‘ n ' numbers, where n is defined by a programmer.
- Write a program in C++ using operator overloading to find a factorial of a given number.
- List the merits and demerits of single inheritance over multiple inheritance.
- Explain Polymorphism in C++ with example.
- to read a set of integers.
- to read a set of double numbers individually.
- What is a template? List the merits and demerits of using a template in C++.
- List the merits and demerits of defining an exception handler in an object oriented programming.
- What are the advantages of using exception handling mechanism in a program?
- Write an object oriented program in C++ that prints the factorial of a given number using a copy constructor and destructor member function.
- What is namespace in C++? What is the correct syntax of defining a namespace?