This document contains 40 questions about various object-oriented programming concepts in C++ such as classes, objects, constructors, destructors, inheritance, polymorphism, operator overloading, templates, exception handling, streams, and file I/O. It asks the reader to define terms, differentiate between concepts, write programs to demonstrate features, and explain key ideas with examples. It covers fundamental OOP principles, advanced topics, and how to apply various C++ features in programming.
This document contains 40 questions about various object-oriented programming concepts in C++ such as classes, objects, constructors, destructors, inheritance, polymorphism, operator overloading, templates, exception handling, streams, and file I/O. It asks the reader to define terms, differentiate between concepts, write programs to demonstrate features, and explain key ideas with examples. It covers fundamental OOP principles, advanced topics, and how to apply various C++ features in programming.
This document contains 40 questions about various object-oriented programming concepts in C++ such as classes, objects, constructors, destructors, inheritance, polymorphism, operator overloading, templates, exception handling, streams, and file I/O. It asks the reader to define terms, differentiate between concepts, write programs to demonstrate features, and explain key ideas with examples. It covers fundamental OOP principles, advanced topics, and how to apply various C++ features in programming.
This document contains 40 questions about various object-oriented programming concepts in C++ such as classes, objects, constructors, destructors, inheritance, polymorphism, operator overloading, templates, exception handling, streams, and file I/O. It asks the reader to define terms, differentiate between concepts, write programs to demonstrate features, and explain key ideas with examples. It covers fundamental OOP principles, advanced topics, and how to apply various C++ features in programming.
1. When would you choose to use C rather than C++?
2. List the features of Object oriented programming.
3. What is Constructor and Destructor, explain using program. 4. What is class and object? Differentiate between class and object ? 5. What is class abstraction? 6. Write a program which uses default constructor, parameterized constructer and destructor. 7. Compare Procedure programming Vs Object oriented programming. 8. What is the use of ‘this’ pointer? 9. Explain Polymorphism. 10. When do we overload the functions and when do we override? 11. Explain Function overloading and operator overloading. 12. Write a program to overload unary operator using friend functions. 13. Write a program to overload binary operator using friend functions. 14. Explain information hiding in C++. 15. Explain public, private and protected keywords using program. 16. What are types of inheritance? 17. What is an abstract class, how it is different from concrete class? 18. What are nested classes, how to access the members of nested classes. Explain using example? 19. Explain need of operator overloading. Write C++ program to demonstrate use of unary operator overloading. 20. What are virtual functions? 21. What is difference between pointer and references? Explain using program. 22. What is significance of Static keyword in programming? 23. Explain the dangling pointer. 24. What is ‘this’ pointer. 25. What is the significance of friend keyword? Explain using program. 26. Write a program to find the sum of an array Arr by passing an array to a function using pointer. 27. Explain virtual base class and virtual function with example. 28. Explain what Function template is and Class template using program. 29. What is exceptional handling? 30. Explain try, catch and throw mechanism of C++ exception al handling. 31. Explain exception handling mechanism in C++? Write a program in C++ to handle “divide by zero” exception. 32. What is a Stream? Explain types of Streams available in C++. 33. What are cin and cout? Explain iostream. 34. What are file pointers? Explain various function used in file pointers. 35. Explain what is fstream, ifstream and ofstream with help of example. 36. What are various functions which are used to manipulate file pointers? Explain using examples. What are stream errors, flags for setting and getting an error. 37. Explain Command line arguments in C++. Write program to explain the same. 38. Write a Program for Reading and writing File Operations. 39. Write a Program of Constructor Overloading.