how do u initialize the constant variables
Answer Posted / keshav.gadde
class sam
{
const int x;
public:
sam(int i):x(i)
{
cout<<i<<endl;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
sam s(10);
return 0;
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Can enum be null?
What is the highest level of cohesion?
What is an advantage of polymorphism?
Advantage and disadvantage of routing in telecom sector
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
how to get the oracle certification? send me the answer
What is difference between polymorphism and inheritance?
State what is encapsulation and friend function?
What is the difference between inheritance and polymorphism?
What is destructor give example?
What is encapsulation in simple terms?
Why is polymorphism used?
What is the point of oop?
What is oops?what is its use in software engineering?
What is encapsulation in ict?