Programming in C++ previous year question paper 2021 | HNBGU MCA first semester

Programming in C++

HNBGU MCA Previous Question Paper 2021-22

    1. Define an object. How is it different from a class? Also explain various advantages of OOP approach over procedural approach.

    2. How array are declared in C++? Write a C++ program to explain how an array is passed as an argument to a function.

    1. What is implicit and explicit type conversion? Write C++ Program to support your answer.

    2. What are the character and symbolic constants? Discuss its needs in C++

    1. State any four points differentiate between compile time polymorphism and runtime polymorphism.

    2. Write a C++ program to add two complex numbers overloading '+' operator.

  1. What is the meaning of public and private inheritance? Explain how various trypes of inheritance are implemented in C++.

    1. Write a C++ program that reads a test file and count the number of vowel present in it.

    2. What is pure virtual function? Discuss its characteristics.

    1. What is constructor? How is it different from destructor? Explain with example.

    2. Explain with example how default and copy constructor are implemented in C++.

      1. Explain how exceptions are handeled in C++.
      2. What is the purpose of using friend function?
      3. Write a program using friend function to overload any unary operator.
    1. Write notes on the following:

      1. Passing structure to a function in C++
      2. Recursion with its merits arid demerits
      3. Working of Inline member function