Section A: Answer any 10 questions 2 x 10 = 20
1. What are the merits of OOP?
2. Compare cin and cout.
3. What are enumerated data types?
4. What is the use of scope resolution operator?
5. List different methods of calling functions.
6. What is the advantage of creating inline functions?
7. Give the syntax of overloading a unary operator with an example.
8. List the operators which cannot be overloaded.
9. Describe any three types of inheritance with examples.
10. Explain new and delete memory management operators.
11. Explain this pointer with an example.
12. Why do we need virtual function?
13. What is late binding?
14. What is a c++ stream?
15. What is the use of tellg() and seekg() functions?
Section B: Answer any 6 questions 6 x 5 = 30
1. Explain the usage of switch statement with example.
2. Explain the difference between structures and unions.
3. With an example, explain how do you create an array of objects?
4. Explain the meaning of different access specifiers.
5. Explain the usage of default arguments in functions with an example.
6. Give the advantages of inheritance.
7. Explain with an example, how you create space for an array of objects using pointers.
8. Explain the use of command line arguments with an example
Section C : Answer any 3 questions 3 x 10 = 30
1. a) What is function overloading?
b) Write a program to implement overloading of functions with default arguments, to find the factorial of a number.
2. a) What are constructors?
b) Write a program to copy a string using constructors.
3. a) What is operator overloading?
b) Write a program to add two complex numbers using the concept of operator overloading.
4. Describe different levels of inheritance with examples.
5. Create a student database using the concept of files. Include the following fields.
Name, Reg-No, Attendance
Enter data for 10 students and output the same in proper format.
No comments:
Post a Comment