668 views
0 votes
0 votes

Which of the following is true?

  1. A static member of a class cannot be inherited by its derived class
  2. A static member of a class can be initialized only within the class it is a member of
  3. A static member of a class can be initialized before an object of that class created
  4. Since static member of a class is actually a global element, it does not require class/object qualifier to access it independently of class/object

1 Answer

1 votes
1 votes
i think its (c)  since static members are initialized at class loading time

Related questions

0 votes
0 votes
0 answers
1
sh!va asked Nov 13, 2016
360 views
Normally when an object is declared, memory is allocated only for data members.Then,a) Where is the memory for functions is allocated?b) How can a object access its membe...
0 votes
0 votes
1 answer
2
im.raj asked May 6, 2016
57,050 views
A. Static functionB. Friend FunctionC. Const FunctionD. Virtual function
0 votes
0 votes
1 answer
3
Sanjay Sharma asked Feb 26, 2017
16,997 views
A struct is the same as a class except that(A) there are no member functions.(B) all members are public.(C) cannot be used in inheritance hierarchy.(D) it does have a thi...
1 votes
1 votes
1 answer
4
Meenakshi Sharma asked Sep 5, 2016
10,501 views
a class having no nameis not allowedcannot have a constructorcannot have a destructorcannot be passed as an argument