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