BSc CSIT Second Semester OOP: Important Chapter-Wise Questions

GYAN WALLA
0

 



BSc CSIT Second Semester OOP: Important Chapter-Wise Questions

Welcome, Second Semester BSc CSIT students! Preparing for your OOP exam requires understanding key concepts and practicing relevant problems. To help you focus your studies, we've compiled a list of important questions based on past papers and the official syllabus, categorized chapter-wise. You can use this guide to test your knowledge and prepare effectively for your examinations.



📘 BSc CSIT – Object-Oriented Programming (OOP) Chapter-wise Past Questions

This post contains the past 5 years' questions of BSc CSIT OOP subject, organized chapter-wise according to the official syllabus. Repeated questions are marked with 🔁.


📘 Unit 1: Introduction to Object-Oriented Programming

📘 Unit 2: Basics of C++ Programming

  • Explain the significance of type conversion. How do we achieve dynamic memory allocation in C++? Explain with an example.
  • What is meant by type conversion? Define two ways of converting one user-defined data type (object) to another.
  • How dynamic memory allocation is done using new and delete? Write a program illustrating the use of new and delete.
  • What is meant by pass-by-reference? How can we pass arguments by reference using reference variables? Illustrate with example.
  • Define class and object with suitable examples. How members of the class can be accessed?
  • What is an inline function? Why is it used? Write a program to illustrate the inline function.
  • What is the principal reason for using default arguments? Explain how missing and default arguments are handled.
  • Define and write syntax for default arguments. Write a program to display N number of characters using default arguments.
  • Create a function called swaps() that interchanges values using a function template. Write a main to test with multiple types.
  • Write a member function reverseit() that reverses a string.

📘 Unit 3: Classes and Objects

  • What is a constructor? Why is it needed in a class? Illustrate types of constructors with examples.
  • What is the use of constructor and destructor? Write a program illustrating default, parameterized, and copy constructors.
  • What is a destructor? List its characteristics. Explain the use of the default copy constructor with an example.
  • What is a destructor? Write a program to show a destructor call (e.g., "memory is released").
  • Write a C++ program to display the number of objects created using static members.
  • What is this pointer? How can we use it for name conflict resolution? Illustrate with example.
  • Write short notes on: this pointer, Static data members
  • What is a constructor? Explain the default and copy constructor with an example. 🔁

📘 Unit 4: Operator Overloading

  • What is operator overloading? Why is it necessary? Write a program for the overloading comparison operator.
  • Write a program to overload the binary + operator using the friend function to add two heights.
  • Write a program that overloads extraction and insertion operators.
  • Write a program for the overloading comparison operator. 🔁
  • Explain the concept of operator overloading. List operators that cannot be overloaded.
  • Write a program to add two distance objects using member and friend functions.

📘 Unit 5: Inheritance

  • Explain the practical implication of protected specifiers in inheritance. List advantages and disadvantages.
  • What are the various class access specifiers? How does public inheritance differ from private inheritance?
  • Depict the difference between private and public derivation. Explain the derived class constructor with the program.
  • Briefly explain the types of inheritance used in OOP.
  • Describe the chain of constructors and destructors in inheritance.
  • How does ambiguity arise in multipath inheritance? How can you remove it?

📘 Unit 6: Virtual Functions, Polymorphism & Miscellaneous

  • Difference between compile time and run time polymorphism.
  • Explain function template overloading with examples.
  • Explain how exceptions are used with a design that includes multiple exceptions.
  • What is the use of reinterpret cast operator? Why do we need a virtual function?
  • Differentiate between concrete class and abstract class. Define class and function templates with syntax.
  • Explain the reason for member function overriding when using virtual function.
  • Explain types of polymorphism briefly. Write the roles of polymorphism and how to achieve dynamic polymorphism.
  • What is an exception? Why use exception handling? Explain try…catch with an example.
  • Explain the default action of the copy constructor. 🔁
  • How can you define a catch statement that can catch any type of exception? Use multiple catches with examples.

📘 Unit 7: Function Templates and Exception Handling

  • Write a program to implement a function template with multiple arguments.
  • What is an exception? Why use exception handling? Explain with try…catch using suitable examples. 🔁
  • When are class templates useful? How to implement a stack with int and string? Illustrate with example.
  • Create a function called swaps() a template for multiple types. 🔁
  • Explain how exceptions are used in C++ with multiple exception design. 🔁

📘 Unit 8: File Handling

  • Write a program that stores employee info in a file and displays it in ascending salary order.
  • Write a program to illustrate the use of seekg() and tellg().
  • Write a program that reads the content of the file data.txt and displays it.
  • What do you mean by the stream? Explain different stream classes for file I/O.
  • Write a program that reads and displays data for 2 student objects.
  • Write a program:
    • Class Account with acc no, balance, min_balance (static)
    • Use an array to store and display 5 accounts
  • Write a program to overload << and >> operators. 🔁
  • What is the use of get and getline? Explain with an example.

Hope this helps you in your exam preparation! 🔁 Questions indicate a high chance of repetition in future exams. Best of luck!

Tags

Post a Comment

0Comments

Post a Comment (0)