Tuesday, June 15, 2021

Object Oriented concepts : Module - 1

         C++ Questions

  1. Identify the differences between procedure oriented programming and object oriented programming
  2. State the important features of object oriented programming. 
  3. List and explain any five features of object oriented programming.
  4. Compare object oriented programming with procedure oriented programming.
  5. Give comparison of C and C++ with example .
  6. Write the general form of function. Explain different argument passing techniques with example 
  7. Explain function overloading with suitable example.
  8. Define function overloading. Write a C++ program to define three overloaded functions to swap two integers, swap two floats and swap two doubles 
  9. Write a C++ program to define three overloaded functions to find the product of two integers, product of two floating point numbers and product of three integers.
  10. Write a C++ program to overload the function area() with three overloaded function to find area of triangle , area rectangle and area of circle 
  11. Explain the working of inline functions with example 
  12. Write a C++ recursive program to find the factorial of a given number 
  13. Explain the use of scope resolution operator 
  14. Implement a C++ program to find prime number between 200 and 500 using for loop. 
  15. List a few areas of applications of OOP Technology. 
  16. What is class?how it is created? Write a c++ program to create a class called Employee with data members name age and salary. Display at least 5 employee information 
  17. How do namespace help in preventing pollution of the global namespace.
  18. What is nested class? What is its use? Explain with example. 
  19. What is static data member?explain with example. What is the use of static members 
  20. Write a class rectangle which contains data items length and breadth and member functions setdata() getdata() displaydata(),area() to set length and breadth, to take user input,to display data and find area of rectangle.
  21. What is a constructor. List the different types of constructor and explain default constructor with example.
  22. Define a Student class with the following measures:
    1. Data Members: RollNo, Name, AvgMarks
    2. Member functions : To read data, To print data
    3. Write a C++ program to read the data of 3 students and print the 3 student information.

        23. Define a friend function. Illustrate with an example.

        24. Explain how one can bridge two classes using friend function. Write a C++ program to find the sum of two numbers using  bridge friend function add().

        25. Can you overload constructors and destructors. Justify with example.

        26.Write a C++ programs to count the number of objects created.

No comments:

Post a Comment

Database Management systems - Module 2

1 a. Explain the entity integrity and referential integrity constraints.   Why is each considered important. Give examples.    b. Discuss eq...