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
Why do you use the namespace feature?
What is the use of setfill in c++?
What is buffer and example?
Will the following program execute?
What is a class template in c++?
Can turbo c++ run c program?
What is private public protected in c++?
Do you know about C++ 11 standard?
Explain what is class definition in c++ ?
Out of fgets() and gets() which function is safe to use?
Are strings mutable in c++?
Define whitespace in C++.
What are features of c++?
What are the basic data types used in c++?
How does a C++ structure differ from a C++ class?