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

What is DlgProc?

0 Answers   C DAC,


Badboy is defined who has ALL the following properties: 1. Does not have a girlfriend and is not married. 2. He is not more than 23 years old. 3. The middle name should be "Singh" 4. The last name should have more than 4 characters. 5. The character 'a' should appear in the last name at least two times. 6. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1 Answers  


What is polymorphism & list its types in c++?

0 Answers  


What is data structure in c++?

0 Answers  


What is singleton pattern in c++?

0 Answers  


Which is the best c++ compiler?

0 Answers  


What is code reusability in c++?

0 Answers  


What is the difference between function overloading and operator overloading?

0 Answers  


What is the purpose of template?

0 Answers  


What is a type library?

0 Answers  


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

0 Answers  


What is oop in c++?

0 Answers  


Categories