Home / Board / ICSE / important Questions / Class 10 / Computer Application / Constructors
Table of Contents
Ans. (b)
Explanation:
Default constructors have no parameters, but they can have parameters with default values.
Ans. (a)
Explanation:
Virtual constructors don't make sense, it is meaningless to the C++ compiler to create an object. Constructors are automatically called by new operator.
Explanation:
Constructor is used to set the initial state of an object. It is executed automatically at the time of object creation. So if we want to initialize an object’s instance variable as soon as it is created into memory, we have to define a constructor for the class.
Explanation:
The attributes of an object are represented by variables known as instance variables.
E.g., consider an object account, the instance variables for account can be :
balance
accountType
clientName
Explanation:
class example
{
int x;
example() / default constructor
{
x = 2;
}
example(int x1) / parameterized constructor
{
x = x1;
}
}
Download Mind Map of this chapter
Download NowWant to Practice Mock Tests of this chapter
Practice NowDownload Important Questions of this chapter
Download NowChapter No. | Chapter Name |
---|---|
Chapter 1 | Revision of Class IX Syllabus |
Chapter 2 | Class as a Basis of all Computation |
Chapter 3 | User - defined Methods |
Chapter 4 | Constructors |
Chapter 5 | Library classes |
Chapter 6 | Encapsulation |
Chapter 7 | Arrays |
Chapter 8 | String handling |
Chapter Wise Important Questions for ICSE Board Class 10 Computer Applications |
---|
Revision of Class IX Syllabus |
Class as a Basis of all Computation |
User - defined Methods |
Constructors |
Library classes |
Encapsulation |
Arrays |
String handling |
CBSE Important Questions Class 9
CBSE Important Questions Class 10
CBSE Important Questions Class 12
CBSE Practice Papers
CBSE Practice Papers
ICSE Important Questions Class 9
ICSE Important Questions Class 10
ICSE Practice Papers
ISC Important Questions Class 12
ISC Practice Papers
Contact Us