NCERT Solutions Class 12 Computer Science Constructor and Destructor

Scroll down for PDF

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 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

CBSE Board Exams 2020 Attendance rules revised for Class 10 and 12 students

CBSE Board Exams 2020: Attendance rules revised for Class 10, 12 students : The Central Board of Secondary Education (CBSE) has announced new rules to deal with the cases of short attendance of students of all its affiliated schools. The board has issued a set of...

JEE Main registration 2020 List of qualifying exams

JEE Main registration 2020: List of qualifying exams The process of JEE (Joint Entrance Examination) Main has already been started from September 3, 2019, on the official website of JEE, i.e. jeemain.nic.in. The interested and eligible students can also apply for JEE...

CBSE to launch 'Tamanna' aptitude test

Introduction: The poor decisive condition of students to pursue their subject of interest has been an area of concern. To the ease of which CBSE is to launch ‘Tamanna’. An aptitude test in order to provide a line of guidance to students of class 9th and 10th. What is '...

Tips for exam preparation

Students often get nervous during their exams. The reason behind this nervousness is either a lack of confidence or a lack of preparedness. To overcome these fears students are advised to do their preparation in such a way that will retain their confidence. For this...

Vidya Daan by CBSE

CBSE has launched a new initiative to provide free of cost quality education to students in rural areas. CBSE has named that initiative “Vidya Daan”. Lot of reforms are been continuously done by CBSE so that the teachers can offer a personalized experience to students...

CBSE class 10, 12 board exam important information

CBSE class 10, 12 board exam: important information to prevent problems for students : The Central Board of Secondary Education (CBSE) has issued an advisory for the students of class 10 and class 12 board. As per the notice, the registration of students appearing in...

×
Studies Today