Why To Use int main()

This is a discussion on Why To Use int main() within the C Programming forums, part of the General Programming Boards category; Hi I am new here and also new to C programming. As you can see that this is my first ...

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    22

    Why To Use int main()

    Hi I am new here and also new to C programming.
    As you can see that this is my first post.


    I have seen many codes and i have a que regarding to main().
    many ppl uses
    Code:
    int main()
    {
            statments;
            return(0);
    }
    and many of uses code like

    Code:
    void main()
    {
            statments;
    }
    Is there any specific reason of using int main() and then returning zero instead of using void main() directly OR all programmers love to type?

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Read the FAQ. If that is not enough for you, then do a board search on your question.

    ~/

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    22
    Thanks Bro
    Next time before posting i will make a study on it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing Program
    By Max_Payne in forum C++ Programming
    Replies: 21
    Last Post: 12-21-2007, 04:34 PM
  2. Debug Error Really Quick Question
    By GCNDoug in forum C Programming
    Replies: 1
    Last Post: 04-23-2007, 12:05 PM
  3. Switch/case Problems (long code in post)
    By Wraithan in forum C++ Programming
    Replies: 2
    Last Post: 12-01-2005, 05:40 PM
  4. getting a headache
    By sreetvert83 in forum C++ Programming
    Replies: 41
    Last Post: 09-30-2005, 05:20 AM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-01-2003, 11:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21