NIOS Class 12 Computer Science Chapter 18 Classes and Objects With Constructors/Destructors

NIOS Class 12 Computer Science Chapter 18 Classes and Objects With Constructors/Destructors Solutions English Medium As Per New Syllabus. to each chapter is provided in the list so that you can easily browse throughout different chapters NIOS Class 12 Computer Science Chapter 18 Classes and Objects With Constructors/Destructors Notes and select need one. NIOS Class 12 Computer Science Question Answers Download PDF. NIOS Study Material of Class 12 Computer Science Notes Paper 330.

NIOS Class 12 Computer Science Chapter 18 Classes and Objects With Constructors/Destructors

Also, you can read the NIOS book online in these sections Solutions by Expert Teachers as per National Institute of Open Schooling (NIOS) Book guidelines. These solutions are part of NIOS All Subject Solutions. Here we have given NIOS Class 12 Computer Science Textbook Solutions, NIOS Senior Secondary Course Computer Science Notes for All Chapter, You can practice these here.

Chapter: 18

Module – 3: Programming in C++

INTEXT QUESTIONS 18.1 

1. Fill in the blanks: 

(a) All members of a class are _____________ by default. 

Ans: Private.

(b) _____________ is an instance of a class. 

Ans: Object.

(c) To define member function outside the class _____________ operator is used.

Ans: : : 

(d) Operator : : is known as _____________ operator. 

Ans: Scope resolution.

(e) The variables declared inside the class are called as _____________ .

Ans: data members.

2. State whether the following statements are true or false: 

(a) A class contains only private data members. 

Ans: False.

(b) A class member is accessed using dot operator. 

Ans: True.

(c) The class declaration must end with a semicolon. 

Ans: True.

(d) Scope resolution operator is always used for defining the member functions outside the class declaration.

Ans: True.

INTEXT QUESTIONS 18.2 

1. Fill in the blanks: 

(a) A constructor name is the same as ___________ .

Ans: Class name.

(b) A constructor is executed automatically when an object is ___________. 

Ans: Created.

(c) Destructor is executed ___________ at the end of the program. 

Ans: Automatically.

(d) A class can have any number of constructors but only ___________destructor at a time. 

Ans: One.

(e) The name of the destructor function is same as that of class but preceded with a symbol ___________ .

Ans: Tilde(~)

(f) The constructor which accepts value from outside is called ___________ constructor.

Ans: Parameterized.

2. State whether the following statements are true or false: 

(a) A constructor name is not the same as class name. 

Ans: False.

(b) In a class, you can have more than one constructor with the same name. 

Ans: True.

(c) Constructor does not return any value. 

Ans: True.

(d) A constructor that accepts no parameter is known as default constructor. 

Ans: True.

(e) Destructor never takes any arguments. 

Ans: True.

(f) Destructor is called automatically at the end of compound statement, function or main program. 

Ans: True.

(g) Constructor initializes the data members of a class.

Ans: True.

TERMINAL EXERCISE 

1. What do you understand by visibility modes in class derivations ? What are these modes? 

Ans: Visibility modes in class derivation define how the members of a base class are inherited and accessed in a derived class. They determine the accessibility of data members and member functions after inheritance.

The three visibility modes are:

(i) Public.

(ii) Private.

(iii) Protected.

2. Define a class Teacher with the following specifications :

Private members :

Name20 characters
subject10 characters
Basic, DA,HRA float
Salaryfloat
NEW VIDEO CLASS

Subject Ka Complete Video Solution Dekhein

Step-by-step easy concept explanation aur full questions Answer ke liye watch karein ya app download karein:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top