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
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
Is java easier than c++?
What is function overriding in c++?
Which function should be used to free the memory allocated by calloc()?
What is atoi in c++?
Define a conversion constructor?
What is the full form of india?
What is format for defining a structure?
What are the different types of polymorphism in c++?
What is the use of main function in c++?
What is the best ide for c++?
Which compiler does turbo c++ use?
What is meaning of in c++?
What are the two main components of c++?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?