NCERT Solutions Class 12 Computer Science Object Oriented Programming in C++

Scroll down for PDF

NCERT Solutions Class 12 Computer Science Object Oriented Programming in C++. NCERT book for Computer Science in class 12 is strongly recommened by teachers and the CBSE and NCERT boards. Please download the NCERT solutions for class 12 Computer Science free in PDF made by teachers of the best schools in India. These solutions are carefully compiled to give detailed understanding of the concepts and also steps of solutions. The NCERT solutions are free to download in pdf format. Please refer to the download link below to download the pdf file and also refer to other chapters and subjects to get the solutions to Computer Science NCERT book questions and exercises.

Chapter - Object Oriented Programming in C++

Question 1: Differentiate between data abstraction and data hiding. [Delhi, 2015]

Answer: Data hiding can be defined as the mechanism of hiding the data of a class from the outside world. This is done to protect the data from any accidental or intentional access. Data hiding is achieved by making the members of the class private. Data abstraction refers to, providing only essential information to’ the outside world and hiding their background details. Members defined with a public label are accessible to all parts of the program. The data abstraction view of a type is defined by its public members.

Question 2: How encapsulation and abstraction are implemented in C++ language ? Explain with an example. [CBSE SQP 2015]

Answer: Abstraction refers to the act of representing essential features without including the background details or explanations. Encapsulation is wrapping up of data and function together in a single unit. We can say that encapsulation is way of achieving abstraction. Both these concepts are implemented in C++ in the form of a class. In a class data and function members are wrapped together. Only essential features are shown to the outside world in the form of member functions with public mode of accessibility. [1]

Example: [1]

class Rectangle


int L, B;

public: void Input()




void Output()





In this example:

Data and member functions are together encapsulated Only Input ( ) and Output ( ) functions are visible outside the class which can only can be accessed outside the class using objects of the same class – Abstraction

Please click on link below to download NCERT Solutions Class 12 Computer Science Object Oriented Programming in C++.


Click on the text For more study material for Computer Science please click here - Computer Science

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

Registration of NEET 2020 starts

The NEET 2020 registration process would start on Monday, December 2nd, 2019. National Testing Agency, NTA would carry out the county’s undergraduate entrance exam for medical and dental admissions.  The examination is scheduled to take place in English, Hindi, and...

Extension of dates by CBSE for Single Girl Child Merit (SGC) scholarship

CBSE has announced to extend dates for SGC scholarship. Previously the dates to submit the SGC scholarship form were 18 October 2019. Now dates have shifted. For online submission, the last date is 31st October. Whereas date for submission of hard copies of renewal...

Guidelines On Reducing Weight Of School Bags

GUIDELINES ON REDUCING WEIGHT OF SCHOOL BAGS In this competitive world, where students are giving their best, an unnoticed threat rides on our back. Heavy School Bags are a serious yet unresolved threat to the health and wellbeing of the young ones. The medium of their...

CBSE Instructs schools to form Eco Clubs

The Central Board of Secondary Education has directed schools to form Eco Clubs under the Board for Environmental Protection. They have further asked the schools to ensure that every student would save one litre of water at home and school every day. It was started by...

CBSE Board Secretary says Class 10 and 12 CBSE Exam Pattern to be modified

The Central Board of Secondary Education is expected to introduce a few changes to the exam pattern for class 10 and board exams by 2023. Anurag Tripathi, secretary of CBSE speaking at an Assoham School Education Summit said that although this year class 10 students...

CBSE Circular Aryabhatta Ganit Challenge

For students with a keen interest in mathematics are now provided with a better opportunity to explore their knowledge. CBSE has announced to conduct an exam for the purpose of generating interest in maths among students. It is a trial to clarify the myth that...

Studies Today