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

  • Home
  • SEARCH
  • 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 80729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:20:54+00:00 2026-05-10T21:20:54+00:00

The last week on the ACM ICPC Mexico competition, I missed a return 0

  • 0

The last week on the ACM ICPC Mexico competition, I missed a ‘return 0’ on a C++ program. For this reason we got punished with 20 minutes.

I had read that the standard does not oblige us to write it at the end of a main function. It is implicit, isn’t it? How can I prove it?

We were using a Fedora system with a G++ compiler.

  • 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. 2026-05-10T21:20:54+00:00Added an answer on May 10, 2026 at 9:20 pm

    You refer to the C++ Standard, chapter 3.6.1 paragraph 5:

    A return statement in main has the effect of leaving the main function (destroying any objects with automatic storage duration) and calling exit with the return value as the argument. If control reaches the end of main without encountering a return statement, the effect is that of executing return 0;

    If you haven’t got the Standard at hand, you can show then the paragraph in a Working Draft. Here is one for c++98, which already had this defined.

    You can learn more here.

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

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer In your style.css file you set the LIST-STYLE-POSITION to inside.… May 11, 2026 at 11:15 am
  • added an answer A working code-sample: var instances = from t in Assembly.GetExecutingAssembly().GetTypes()… May 11, 2026 at 11:15 am
  • added an answer Yes, it is possible, but not terribly straightforward. The complicating… May 11, 2026 at 11:15 am

Related Questions

The last week on the ACM ICPC Mexico competition, I missed a return 0
The last cross platform desktop development I did was Java/Swing. What about flex?
The last GUI programming I have done was with Visual Basic, which included objects
The last question I asked concerned how to bin data by x co-ordinate. The
The last I used was weka . The last I heard java was coming
Over the last few months/years, I have shared a folder or two with numerous
For the last couple of months I have been writing an intranet site for
After the last project I've done using WebForms, I've decided to pass on using
Within the last year I have become addicted to subversion. I am an only
Over the last few days I have noted a few web sites that demonstrated

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.