CU SEC-A-2 Object Oriented Programming in C++, 2024
University of Calcutta question paper, B.Sc. General Semester V, 2024. Object Oriented Programming in C++. Typed in LaTeX, searchable, with a printable PDF.
Open this paper in MathQP
- The members of a class are by default
- A copy constructor takes
- A friend function can be called
- In inheritance, order of execution of base class and derived class destructors are
- Find the value of x in the following program segment : a = 2, b = 3; x = ++a + b++;
- Which of the following is not a loop keyword?
- How many times will “STOP” be printed in this program? #include <stdio.h> int main () int n; for (n=1; n<=10; n++) printf("STOP");
- Which of the following operators cannot be overloaded?
- Which of the following constructor related concepts is non-relevant in C++?
- Which keyword is used to access the variable in namespace?
- Discuss various operators used in C++.
- Explain the differences between class and object in object oriented programming language.
- Write a C++ program to check whether a given number is divisible by 6 . Print the quotient, if divisible.
- What is the use of compiler? Write the difference between Compiler and Interpreter.
- Write a program in C++ to find the largest number among four numbers.
- Write a C++ program that will ask for a temperature in Fahrenheit and display it in Celsius.
- What is object oriented programming? How are data and functions organized in an object-oriented program?
- What is a Class? How does it accomplish data hiding?
- Explain destructor with an example.
- Distinguish between inheritance and polymorphism with examples.
- Can you overload verb |* *| to make it compute the value of one object raised to the power of another? Give reasons for your answer.
- What is a friend function? What are the merits and demerits of using friend functions?
- What does polymorphism mean in C++ language? How is polymorphism achieved at compile time?
- Write a C++ program to add two given 2 times 2 matrices with operator overloading.
- Write a C++ program to create a template to find the maximum value stored in an array.
- What is namespace in C++? Write the syntax of defining a namespace. Write a C++ program to swap two numbers.
- Explain class template.
- How many types of templates are there in C++?
- Write on the different types of exceptions.
- What is exception handling? Explain how to handle an exception with appropriate example.
- What is the use of copy constructor?