Thread: main() function in c

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    99

    main() function in c

    Dear Experts,

    Can you please tell me this basic question which i am not getting the answer

    "which header file contains main() function in c"

    whether it is pre defined function or user defined function.

    thanks in advance.
    Last edited by vin_pll; 12-11-2009 at 04:27 AM.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Wow, triple posting. That's something new.

    But I bet it's a trick-question! My answer would be "normally, no header contains the main() function". Am I right?

    </sarcasm>

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    99
    ya extremely sorry for the triple posts as the problem was with the submit button,

    still i have the same question ,

    as experts will comment on this.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I'll indulge you on this one.
    It's a user-defined function, thus it's not defined in any header.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM