Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6111777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:40:10+00:00 2026-05-23T14:40:10+00:00

This is very trivial question regarding the use of a constructor in C++. I

  • 0

This is very trivial question regarding the use of a constructor in C++. I will present in the form of an interview dialogue (it was difficult to present it in any other forms)

interviewer – what is a constructor?
me – constructor are special functions which makes sure that all objects are initialized before their use.

interviewer – what is an initializer list?
me – that is a list where all the initialization happens. A constructor’s body is entered only after all the data members are initialized, or some constructor of all the member objects are called.

interviewer – that means initialization is carried out in initializer list, not inside constructor. But you said constructor initialize the object! Didn’t you? Do you want to answer my first question.
me – I think constructor does assignment, it calls assignment operator on already initialized member objects.

So my question to you can be

how initializer list works?

what lies between function’s starting address & starting braces [{]?

or just answer me how to convince my interviewer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:40:11+00:00Added an answer on May 23, 2026 at 2:40 pm

    You’re overthinking it and allowing the interviewer to confuse you.

    Initializing the members of an object is not the same thing as initializing the object itself. Just because the members have sane values doesn’t mean the object has been constructed. Until the constructor has completed, the object itself has not been properly initialized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a very trivial question. I am trying to use the stanford
I suspect this is a very trivial question. I'm writing a PHP script to
I fear this is a very trivial question. But I'm having some trouble getting
This is probably a very trivial question, but I haven't been able to find
This looks very trivial and is not a home work question. public void sum(int[]
This is a very trivial question!! In some computer vision literature, side-lobes are mentioned..
May be this is too trivial question. I use C#, asp.net 4, EF4, I
This may or may not be a very trivial question, but then again, I'm
I just wanna ask this very trivial question, I do not know if this
this is a very trivial question. but Eclipse IDE is telling me that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.