NCERT Solutions Class 12 Computer Science Constructor and Destructor

NCERT Solutions Class 12 Computer Science Constructor and Destructor. 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 - Constructor and Destructor

Question 1: Write four characteristics of constructor function used in a class. [Delhi, 2014]

Answer: (i) A constructor function has no return type.

(ii) Name of constructor is same as that of class.

(iii) A constructor can be called while creating objects.

(iv) If there is no constructor declared in class then default constructor is invoked. (1/2 mark for each characteristic).

Question 2: What is a copy constructor ? Give a suitable example in C++ to illustrate with its definition within a class and a declaration of an object with the help of it. [Delhi, 2015]

Answer: A copy constructor is an overloaded constructor in which an object of the same class is passed as reference parameter,

class point

{ int x ;

public :

point ( )

{

x = 0 ;

}

point (Point &p) // copy constructor {x = p . x;} };

void main ( ) {

point p1;

point p2 (p1) ; // copy constructor is called here //

OR

point p3 = p1 ; //Copy constructor is called here

}

Please click on link below to download NCERT Solutions Class 12 Computer Science Constructor and Destructor.

Tags: 

 


Click to View or Download pdf file
Click for more Computer Science Study Material

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

Board Cancelled Official CBSE Statement

Keeping in view the requests received from various State Governments and the changed circumstances as on date, following has been decided- 1. Examinations for classes X and XII which were scheduled from 1st July to 15th, 2020 stand cancelled. 2. Assessment of the...

CBSE Decision on Board Exam 2020

The Class 10 and 12 exams are cancelled, and results for both 10th and 12th would be declared by July 15 based on internal exams. CBSE Class 12 students would have the option to appear for the exams at a later date. CBSE has a scheme in which marks scored in past 3...

CBSE Reduced Syllabus Clarification

CBSE board has issued the following clarification relating to various news reports regarding reduction in syllabus and questions from the reduced syllabus during board exams. Please read below: It has come to notice of the Board through a section of media reports that...

FAQs CBSE Board Exam Results Class 10 and 12

FAQs CBSE Board Exam Results Class 10 and 12 Q.1. What does the term RT in the marksheet mean? Ans.The term RT means REPEAT IN THEORY. This is the term used from 2020 instead of FAIL IN THEORY(FT) Q.2. What does the term RP in the marksheet mean? Ans.The term RP means...

Training Programme on the Alternative Academic Calendar

In view of the extraordinary situation prevailing in the world due to COVID-19 pandemic, the CBSE Board had announced the ‘Revised Academic Curriculum for classes 9- 12 for the session 2020-21’. The reduced topics will not be part of the internal assessment or for the...

×
Studies Today