0% found this document useful (0 votes)
5 views2 pages

Viva Questions CPP

The document outlines a series of viva questions based on a syllabus for Object-Oriented Programming, covering key concepts such as OOP features, classes and objects, operator overloading, inheritance, polymorphism, templates, namespaces, exception handling, and file operations in C++. Each unit includes specific questions aimed at assessing understanding of fundamental programming principles and practices in C++. The content is structured into six units, addressing foundational topics and advanced concepts in C++ programming.
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
5 views2 pages

Viva Questions CPP

The document outlines a series of viva questions based on a syllabus for Object-Oriented Programming, covering key concepts such as OOP features, classes and objects, operator overloading, inheritance, polymorphism, templates, namespaces, exception handling, and file operations in C++. Each unit includes specific questions aimed at assessing understanding of fundamental programming principles and practices in C++. The content is structured into six units, addressing foundational topics and advanced concepts in C++ programming.
Copyright
© © All Rights Reserved
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

Viva Questions Based on Syllabus

Unit I: Foundation of Object Oriented Programming

- What are the main features of Object-Oriented Programming (OOP)?

- Explain the difference between Procedural Programming and Object-Oriented Programming.

- What is the concept of data abstraction and data encapsulation?

- What is the need for object-oriented programming?

- What are inline functions and when are they used?

- What is function overloading? Give examples.

- What is dynamic initialization of variables in C++?

Unit II: Classes & Objects

- How do you define a class and an object in C++?

- What are constructors and destructors? Explain their types.

- What is the difference between static and non-static members?

- Explain the concept of arrays of objects.

- How is an object passed as a function argument?

- What is a copy constructor?

Unit III: Operator Overloading

- What is operator overloading? Why is it needed?

- How do you overload unary and binary operators in C++?

- What is the difference between overloading using member functions and friend functions?

- What restrictions are there on operator overloading?

- Can you overload all operators in C++? If not, name a few which cannot be overloaded.
Unit IV: Inheritance and Polymorphism

- What is inheritance? What are the types of inheritance?

- What is multiple inheritance and what ambiguity can occur?

- Explain hybrid inheritance with an example.

- What is polymorphism? Explain compile-time and run-time polymorphism.

- What is a virtual function? Why is it used?

- What are abstract classes?

- What is a pure virtual function?

Unit V: Templates, Namespaces and Exception Handling

- What is a template? Explain function and class templates with examples.

- What is the difference between function overloading and function templates?

- What are namespaces in C++? Why are they used?

- What is exception handling? Explain try, catch, and throw keywords.

- What are multiple exceptions? How do you handle them?

- Explain formatted and unformatted I/O operations in C++.

Unit VI: Working with Files

- How do you open and close a file in C++?

- What is the purpose of file pointers?

- How do you detect the end of a file (EOF) while reading?

- What is the difference between formatted and unformatted file I/O?

- How do you update data in a file?

You might also like