what is a constructor? give me a example of inheritance?
37 Views|Posted 2012-03-02 20:31:10
Asked by Narendra Kumar
2 Answers

Answered by
2012-03-02 21:22:00
Hi Narendra,
As Shiksha is an Education portal which guides students for career and education related queries, you would not get much information on a particular topic of your course. However, just for your information a constructor is a special type of subroutine called at the creation of an objec

Answered by
2012-03-02 21:02:52
constructors define the actions to be performed by the compiler when a class object is instantiated without actual parameters. Its sole purpose is to save the data members from the garbage value. It initialize the data members with the default values. a constructor (sometimes shortened to ctor) in a
Taking an Exam? Selecting a College?
Get authentic answers from experts, students and alumni that you won't find anywhere else.
On Shiksha, get access to
66K
Colleges
|
1.2K
Exams
|
6.9L
Reviews
|
1.8M
Answers
Didn't find the answer you were looking for?
Search from Shiksha's 1 lakh+ Topics
or
Ask Current Students, Alumni & our Experts
Have a question related to your career & education?
or
See what others like you are asking & answering