class HasStatic {
static int I;
};
Referring to the sample code above, what is the appropriate
method of defining the member variable "I", and assigning it
the value 10, outside of the class declaration?
a) HasStatic I = 10;
b) int static I = 10;
c) static I(10);
d) static I = 10;
e) int HasStatic::I = 10;
Answer Posted / guest
Ans e)
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What causes a runtime error c++?
Why is c++ still best?
What are the various access specifiers in c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
Is c++ fully object oriented?
Write a c program for binary addition of two 8 bit numbers.
What do you mean by global variables?
Ask to write virtual base class code?
What are disadvantages of pointers?
What is class syntax c++?
What is the difference between an external iterator and an internal iterator?
What new()is different from malloc()?
What do you mean by stack unwinding in c++?
What are the two types of comments?