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;



class HasStatic { static int I; }; Referring to the sample code above, what is the approp..

Answer / guest

Ans e)

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More C++ General Interview Questions

Explain what are single and multiple inheritances in c++?

0 Answers  


Can c++ be faster than c?

0 Answers  


Can a function take variable length arguments, if yes, how?

0 Answers  


What is isdigit c++?

0 Answers  


What is new in c++?

0 Answers  






Write about the members that a derived class can add?

0 Answers  


Discussion on error handling of C++ .

0 Answers  


What is rtti in c++?

0 Answers  


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

0 Answers  


How would you stop a class from class from being derived or inherited?The constructer should not be Private,as object instantiation should be allowed.

15 Answers   Satyam,


what is smart pointer & use of the smart pointer ???

2 Answers  


Define the process of handling in case of destructor failure?

0 Answers  


Categories