how do u initialize the constant variables
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / bibin joy
class A
{
const int mConstVal ;
A():mConstVal (10)
{
}
}
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / yughandhar
as for my knowledge,the constant variables are intialised by
keyword called DEFINE
Eg:
#define pie=3.14
Is This Answer Correct ? | 4 Yes | 7 No |
The company is a fake company asking for money of RS10000 while training and not offering a job after training. My humble request to you people not to attend Astersys interview
Why many objects can working together? How objects working togetherM I want to see example code.
What is use of overloading?
write knight tour problem which is present in datastructure
What is class and example?
How do you define social class?
define a string class. overload the operator == to compare two strings
2 Answers Birla, Ericsson, HCL, Infosys, Infotech, MCAS, Satyam,
string is a class or data type in java?
What is a template?
what is the use of template classes in c++
What is solid in oops?
Explain polymorphism? What r the types of polymorphism? pls give examples?