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 is an undefined reference/unresolved external symbol error and how do I fix it?
What is a null object in c++?
Why is swift so fast?
Write a program in C++ for Fibonacci series
What is a tuple c++?
What is expression parser in c++
Does std endl flush?
How do you initialize a string in c++?
Why iomanip is used in c++?
What is auto used for in c++?
What is a storage class used in c++?
What is a local reference?
What is abstraction with real time example?
What is auto type c++?
Why we use #include iostream in c++?