We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Question Bank
1. Explain the features of c++ programming
2. List all the conditional control statement. Explain any two with syntax and example 3. List all the looping statement. Explain each with syntax example 4. Explain goto label. With a snippet code of your choice 5. Explain break statement with example 6. Write C++ program to Armstrong / not for 4 digit numbers 7. Write C++ program to simple calculator 8. Write C++ program to Fibonacci series 9. Write C++ program to Largest among 3 numbers 10. Write C++ program to swap two numbers 11. Write C++ program to area & perimeter of rectangle, triangle circle 12. An electricity board charges the following rates for use of electricity for the first 200 units rs.1 per unit of the next 100 unit Rs. 1.5 per unit beyond 300 units Rs.2 per unit. Write a C++ program to read number of unit consumed and print out total charge amount. 13. Write a C++ program to print Floyd's pattern triangle pyramid 14. What are objects? How are they created? 15. What is the class? how do Structures in C and C++ differ? 16. How is the member function of the class defined? Can we use the same function name for a member function of a class and a outside function in the same program file? If yes how are they distinguish, if no give reason. 17. Describe the mechanism of the accessing data member and member function in the following cases.
•Inside the main program.
•Inside a member function of the same class. •Inside the same class. 18. Explain different type of constructor with example. 19. Describe the importance of destructor. 20. Distinguish between the following to statements. T1(T2); T1=T2; T1 and T2 are the objects of time class. 21. Write a C++ program for adding members of two different classes using friend function. 22. Write a C++ program for creating a friend class to add two numbers. 23. Write a C++ program to calculate the area of the wall using parameterized constructor. 24. Show the use of multiple inheritance with the help of proper programming example 25. Explain Inheritance in C++ with example 26. Write a C++ program to demonstrate example of private simple inheritance. 27. Write a C++ program to read and print student's information using two classes and simple inheritance. 28. Write a C++ program to read and print employee information using multiple inheritance. 29. Write a C++ program to demonstrate example of multiple inheritance. 30. Write a C++ program to demonstrate example of hierarchical inheritance to get square and cube of a number. 31. Write a C++ program to read and print employee information with department and pf information using hierarchical inheritance. 32. Show the use of Single inheritance with the help of proper programming example 33. Show the use of Multilevel inheritance with the help of proper programming example 34. Show the use of Hybrid inheritance with the help of proper programming example 35. Show the use of hierarchical inheritance with the help of proper programming example 36. What functions are used in C for dynamic memory allocation and deallocation? 37. Describe a scenario where the .* operator would be used. Explain the syntax and functionality of the ->* operator. Provide an example where the ::* declarator is used to declare a pointer to a member function. 38. Explain the syntax for declaring a pointer to an object of a class in C++. 39. How can pointers be used with derived classes in C++? Explain with example. 40. What is the difference between a base class pointer pointing to a base class object and a base class pointer pointing to a derived class object? Explain with example. 41. What does the term polymorphism mean in the context of object-oriented programming? How are overloaded member functions selected for invocation in C++? What is early binding in C++, and how is it also known as static binding or static linking? 42. What is the role of a virtual function in achieving runtime polymorphism? 43. Explain how the provided C++ program demonstrates the concept of unary operator overloading using the ! operator to calculate the factorial of a number. 44. Explain how the provided C++ program demonstrates the concept of overloading the unary operator - for a complex class, which represents complex numbers. 45. Explain how the provided C++ program demonstrates the concept of overloading the unary minus operator - for a space class, which represents coordinates in 3D space. 46. Explain how the provided C++ program demonstrates the concept of overloading the unary minus operator - for a space class using a friend function. 47. How does the provided C++ program demonstrate the concept of overloading the binary + operator for a sum class, which represents an integer value? 48. Explain the purpose of the "try" keyword in the context of the provided program. 49. Explain the purpose of the "throw" keyword in the context of the provided program. 50. Can the "catch" block handle other types of exceptions in this program? Why or why not? 51. What are synchronous and asynchronous exceptions? Categorize the division by zero error as either synchronous or asynchronous and justify your choice. 52. How does the provided C++ program demonstrate the concept of re-throwing an exception? What is the purpose of re-throwing an exception, and how does it affect the program's behavior? Explain the flow of execution from the initial throw. 53. How does the provided C++ program demonstrate the concept of using multiple catch statements to handle different types of exceptions? 54. What are the main stream classes provided by the C++ Standard Library for handling input and output operations? Describe their roles. 55. Explain the difference between formatted and unformatted I/O operations in C++. Provide examples of each. 56. What are manipulators in C++ and how are they used in formatted I/O operations? Provide examples 57. Describe the purpose and usage of ifstream, ofstream, and fstream classes in C++. 58. How do the open() and close() functions work in file stream classes? Provide a code example 59. What are seekg(), seekp(), tellg(), and tellp() functions in C++? Provide an example of their usage. 60. How are put(), get(), write(), and read() functions used for sequential input and output operations in C++? Provide examples 61. Describe the use of eof(), fail(), bad(), and good() functions for error handling in file operations 62. Explain the different file modes that can be used with the open() function in C++. Provide examples of opening a file in read, write, and append modes 63. How do you perform binary file I/O operations in C++? Explain with an example