Chapter 12 Flashcards

1
Q

If we do not initialize static variable at the time of definition then it is automatically initialize with the value 0. True or false

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many ways we can access static data member

A
  • Normal

- Through static resolution operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Tell about life of static data member

A
  • They are created when even there is no object of class

- They remain in memory even when all objects of a class are destroyed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The best use of static data member is global variable. True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can this pointer be passed to static member function

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can we make arrays of object

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How we can make arrays of object

A

We can make arrays of object for the class which have default constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly