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

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

Open this paper in MathQP

  1. Which of the following statements is incorrect about the ‘void pointer’?
  2. The ability to declare different methods with the same name in a class is known as
  3. A variable defined within a block is visible
  4. The library function texttt exit() causes an exit from
  5. A friend function can be called
  6. The texttt and texttt || operators
  7. Which of the following function declaration using default arguments is correct?
  8. In inheritance, order of execution of base class and derived class destructors are
  9. Which is the default access specifier of a structure in C++?
  10. Which keyword is used to access the variable in namespace?
  11. What is object-oriented programming? How is it different from the procedure-oriented programming?
  12. What are the unique advantages of an object-oriented programming paradigm?
  13. State the basic differences between C and C++. Discuss the history of C++. Write down the short note on arrays and pointer.
  14. Write a C++ program to find the binary representation of a given positive number.
  15. How does a texttt main() function in C++ differ from texttt main() in C?
  16. What are pointers? Explain with an example.
  17. Identify the error in the following program : Void main() int i = 0; i = i + 1; cout << i <<" "; /*comment *//i = i + 1; cout << i;
  18. What is a constructor? Explain different types of constructor with example. What is the advantage of user-defined copy constructor over default copy constructor?
  19. Distinguish between the following terms :
  20. What is the use of operator overloading? Write a C++ program to add two given 2 times 2 matrices using operator overloading.
  21. What is inheritance? Mention some advantages of inheritance. Describe different types of inheritance with examples.
  22. What is an exception?
  23. How is an exception handled in C++?
  24. What are the advantages of using exception handling mechanism in a program?
  25. What is template class? How is it different from class template? Explain with suitable example. How is template function advantageous over function overloading?
  26. What are the differences between exception handling and traditional error handling?
  27. What is the usefulness of exception handling?
  28. What is copy constructor?
  29. What is namespace in C++? What is the correct syntax of defining a namespace?
  30. How do we access the variables declared in a named namespace?
  31. What is wrong with the following namespace definition? Namespace Main int main( ) // ..................