Bsc Csit Nepal

2070

Object Oriented Programming

Full Marks: 60
Pass Marks: 24
Time: 3 hours

Long Questions:

Attempt any two questions: (2 × 10=20)

  1. Write any four features of object-oriented programming. Differentiate between operator overloading and function overloading.
  2. Why do we need the preprocessor directive # include < io stream >? Describe the major parts of a C++ program.
  3. What do you mean by overloading of a function? When do we use this concept? Explain with example.

Short Questions

Attempt any eight questions: (8 × 5=40)

  1. What do you mean by dynamic initialization of variables?
  2. Explain with example of an inline function.
  3. What is virtual function? Explain.
  4. Differentiate between structure and class in terms of access modifier.
  5. What are the characteristics of constructor?
  6. Differentiate between overriding vs overloading.
  7. Explain the function templates with example.
  8. How can we define our functions inside the namespace and use them outside?
  9. Write the syntax and use of getline() and write() functions.
  10. Explain the friend function with its syntax.