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

  1. The members of a class are by default
  2. A copy constructor takes
  3. A friend function can be called
  4. In inheritance, order of execution of base class and derived class destructors are
  5. Find the value of x in the following program segment : a = 2, b = 3; x = ++a + b++;
  6. Which of the following is not a loop keyword?
  7. 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");
  8. Which of the following operators cannot be overloaded?
  9. Which of the following constructor related concepts is non-relevant in C++?
  10. Which keyword is used to access the variable in namespace?
  11. Discuss various operators used in C++.
  12. Explain the differences between class and object in object oriented programming language.
  13. Write a C++ program to check whether a given number is divisible by 6 . Print the quotient, if divisible.
  14. What is the use of compiler? Write the difference between Compiler and Interpreter.
  15. Write a program in C++ to find the largest number among four numbers.
  16. Write a C++ program that will ask for a temperature in Fahrenheit and display it in Celsius.
  17. What is object oriented programming? How are data and functions organized in an object-oriented program?
  18. What is a Class? How does it accomplish data hiding?
  19. Explain destructor with an example.
  20. Distinguish between inheritance and polymorphism with examples.
  21. Can you overload verb |* *| to make it compute the value of one object raised to the power of another? Give reasons for your answer.
  22. What is a friend function? What are the merits and demerits of using friend functions?
  23. What does polymorphism mean in C++ language? How is polymorphism achieved at compile time?
  24. Write a C++ program to add two given 2 times 2 matrices with operator overloading.
  25. Write a C++ program to create a template to find the maximum value stored in an array.
  26. What is namespace in C++? Write the syntax of defining a namespace. Write a C++ program to swap two numbers.
  27. Explain class template.
  28. How many types of templates are there in C++?
  29. Write on the different types of exceptions.
  30. What is exception handling? Explain how to handle an exception with appropriate example.
  31. What is the use of copy constructor?