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 do you mean by static variables?
what is data abstraction in C++?
Explain class invariant.
What do you mean by inheritance in c++?
Can create new c++ operators?
If a function doesn’t return a value, how do you declare the function?
Describe the role of the c++ in the tradeoff of safety vs. Usability?
Is vector a class in c++?
Explain the properties and principles of oop.
How can you specify a class in C++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
What are the steps in the development cycle?
Which coding certification is best?
Explain how to initialize a const member data.
program explaining feautures of c++