why all c++ program must have default constructor?

Answer Posted / jayakrishna

In c++ we have constructors for initialising the values for
the variables where destructors are present in order to
deallocate the the memory after completion of the work.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a pointer with example?

665


Describe protected access specifiers?

679


What is namespace & why it is used in c++?

610


Which function should be used to free the memory allocated by calloc()?

594


Which bit wise operator is suitable for checking whether a particular bit is on or off?

613






Is c++ the best programming language?

544


How can an improvement in the quality of software be done by try/catch/throw?

596


Is there any difference between int [] a and int a [] in c++?

559


When do we run a shell in the unix system?

566


Is multimap sorted c++?

562


Explain deep copy and a shallow copy?

618


How to declare a function pointer?

583


Differentiate between an array and a list?

711


Is std :: string immutable?

567


How do I tokenize a string in c++?

612