what is a constructor? give me a example of inheritance?

37 Views|Posted 2012-03-02 20:31:10
2 Answers
Pooja Kohli
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

...Read more

Thumbs Up IconUpvote Thumbs Down Icon
amitesh kumar Saha
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

...Read more

Thumbs Up IconUpvote Thumbs Down Icon

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

Share Your College Life Experience

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