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 do you mean by inheritance in c++?

0 Answers  


Difference between inline functions and macros?

0 Answers  


Is c the same as c++?

0 Answers  


How to write a program such that it will delete itself after exectution?

3 Answers  


What are the general quetions are in DEna bank manager IT/System interviews?

0 Answers   Dena Bank, ICICI,


Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)

4 Answers   HTC, TCS,


What does catch(…) mean?

0 Answers  


Are there interfaces in c++?

0 Answers  


What gives the current position of the put pointer?

0 Answers  


Explain storage qualifiers in c++.

0 Answers  


Which is not a valid keyword a) public b) protected c) guarded

0 Answers  


Write a program to reverse a linked list?

8 Answers   Catalytic Software, Satyam,


Categories