Difference between Constructors and static constructors?
Answer Posted / venkataramakrishna. danduri
The main thing is the constructoe can't be Static, int or
any other data type. It will simpley throws a error
messgae. It is just to confuse the candidate.
Example:
class A
{
public:
static A(){ a = 0;}
int a;
};
void main()
{
A a;
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is called array?
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
Write about the stack unwinding?
Should I learn c or c++ first?
Can a program run without main in c++?
What is the difference between strcpy() and strncpy()?
Write a program to find the Factorial of a number
What is a virtual destructor? Explain the use of it?
Can notepad ++ run c++?
How is c++ different from java?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is a friend function in c++?
What is token c++?
What is fflush c++?
Name the debugging methods that are used to solve problems?