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 860649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:50:51+00:00 2026-05-15T08:50:51+00:00

Please, tell me from where execution starts in c++, hope your answer is from

  • 0

Please, tell me from where execution starts in c++, hope your answer is “from main”.

Then what about this?

class abc
{ 
public:
    abc()
    { 
        cout<<"hello";
    }
};

const abc obj;

int main( )
{ 
    cout<<"Main";
}

output:

helloMain 

Please elaborate.

  • 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-15T08:50:51+00:00Added an answer on May 15, 2026 at 8:50 am

    From your comments to the other answers strut, it sounds like a 10,000 foot view might assist in understanding.

    The exact steps involved in launching an application differs between OSes, compilers, and programming languages but the “general” process is essentially the same.

    1. The OS kernel is asked to start a new process that runs the target executable
    2. The kernel creates a new process to host the exectuable
    3. The kernel sets up basic process attributes: File descriptors, environment variables, security attributes, etc.
    4. The kernel runs a user-mode “loader” to actually open the file contianing the executable and get it ready for execution
    5. The loader reads the file containing the executable and breaks it out into various segments: global variable data, executable code, etc
    6. The loader resolves any dynamic-link library symbols and properly lays out memory for the executable code (essentially, this step involves making sure that all pointers in the program point to the proper locations)
    7. The loder then invokes the “entry” function of the executable. However, this is not your ‘main’ function. The ‘entry’ function is usually hidden by the OS/compiler to allow for pre-main initialization code to run.
    8. In the case of C++ the entry function will most likely look something like the following:

    int __entry( int argc, char *argv[] )
    {
        // configure standard I/O streams, threading tables, & other utilities
        initialize_c_runtime(); 
    
        // run the constructors for all static objects
        initialize_static_cplusplus_objects(); 
    
        // Now, finally, after *all* that we execute the 'main' function
        return main(argc, argv);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently written this with help from SO. Now could someone please tell me
Please tell the execution time difference in sql server 2005 select table1.* from table1
Can someone please tell me how to show all privileges/rules from a specific user
I want to access a scrollviewer from another thread. Please tell me how to
I want to make a drop-down list from scratch. Can anyone please tell me
Please tell me how to use try/catch properly with boost::exception. This is one of
I'm hell bent on making this work with NAudio, so please tell me if
Good day, could you please help me look and this code and tell me
Please tell me what is the Qt equivalent function for glutswapbuffers()..
Please tell me why my window doesn't render. Below is the javascript that i

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.