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


Please Help Members By Posting Answers For Below Questions

What is an undefined reference/unresolved external symbol error and how do I fix it?

612


What is a null object in c++?

646


Why is swift so fast?

632


Write a program in C++ for Fibonacci series

672


What is a tuple c++?

553






What is expression parser in c++

1898


Does std endl flush?

615


How do you initialize a string in c++?

568


Why iomanip is used in c++?

645


What is auto used for in c++?

577


What is a storage class used in c++?

624


What is a local reference?

679


What is abstraction with real time example?

631


What is auto type c++?

635


Why we use #include iostream in c++?

592