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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:02:18+00:00 2026-05-27T14:02:18+00:00

When I browsed the source code of unzip, I encoutered a main function as

  • 0

When I browsed the source code of unzip, I encoutered a main function as follows,

int MAIN(argc, argv)   /* return PK-type error code (except under VMS) */
    int argc;
    char *argv[];
{
    int r;

    CONSTRUCTGLOBALS();
    r = unzip(__G__ argc, argv);
    DESTROYGLOBALS();
    RETURN(r);
}

I think the main function defined like this would not pass while compiling. But my c compiler does not complain about it. Why it is syntactically correct?

Thanks.

  • 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-27T14:02:19+00:00Added an answer on May 27, 2026 at 2:02 pm

    This is the old K&R style function declaration. So yes, it’s valid C, abeit very old C.

    I wouldn’t recommend writing this type declaration since it’s completely obsolete and will likely confuse anyone reading your code who isn’t familiar with the syntax.

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

Sidebar

Related Questions

Previously when I browsed source code files using Xcode's file browser (located on left
Is the Froyo (Android 2.2) source code available? I've browsed the Android code repository
I browsed the source code of FormsAuthentication, and noticed it ends in context.Response.Redirect(strUrl, false);
i have a site where people can download source code, sorta paste type site,
Here is my source code: FB.ui({method: 'apprequests', to: fbId, message: hello}, function(resp){ if(resp.request_ids){ $('#req-id').val(resp.request_ids);
Is it possible to browse the source code of OpenJDK online, just like I
jquery.js source code is not being recognised by browser using my page.html served by
I want to browse the source code of gnu implementation of C++ standard libraries
Sorry for maybe this is stupid question, I just want download source code form
I want to remove lines look as follows but I still want to return

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.