+ Reply to Thread
Results 1 to 9 of 9

Thread: Ambiquity with main

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Location
    India
    Posts
    25
    Rep Power
    8


    What is main in C program?


    Is it a userdefined function or Built in function?
    praWIN

  2. #2
    Senior Member
    Join Date
    Mar 2006
    Location
    India
    Posts
    312
    Rep Power
    11
    it has both characterstics. because its prototype is specified by compilerbut its defination will be given by us.
    but many people specified that it is user defined only.
    Nachithe entha riskaina chesta
    okkasari fix ayithe naa maata nene vinanu

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Location
    India
    Posts
    25
    Rep Power
    8
    OK, Thats fine. Why people say tht user defined???
    Quote Originally Posted by murari
    it has both characterstics. because its prototype is specified by compilerbut its defination will be given by us.
    but many people specified that it is user defined only.
    praWIN

  4. #4
    Senior Member
    Join Date
    Mar 2006
    Location
    India
    Age
    28
    Posts
    188
    Rep Power
    9
    definition of a function means the body of the function...

    only the prototype of main is pre-defined.
    the body hence the definition of the main function is user defined..

    functions like printf(), strlen() etc are built-in functions as their definition is pre-defined.


    -------
    we make our habits...
    and our habits make us...

  5. #5
    Senior Member
    Join Date
    Mar 2006
    Location
    India
    Posts
    312
    Rep Power
    11
    i have told u naits defination given by us only. Based on that they decided it to be user defined. Inbuilt functions defination won't be given by us na.
    Nachithe entha riskaina chesta
    okkasari fix ayithe naa maata nene vinanu

  6. #6
    Junior Member
    Join Date
    May 2006
    Location
    Posts
    4
    Rep Power
    7
    main in cProgram is built in function
    neha

  7. #7
    Junior Member
    Join Date
    May 2006
    Location
    India
    Posts
    1
    Rep Power
    7
    main() is de only function which is invoked by the operating systems hence the name.Other functins used in a program is usually invoked by some other functions other than the OS.



  8. #8
    Junior Member
    Join Date
    May 2006
    Location
    India
    Posts
    6
    Rep Power
    7


    Hai,
    The main() in C is a function whose syntax,prototupe is defined.It is a user defied function which must exist in the program.
    seshagiri.N

  9. #9
    Senior Member
    Join Date
    Mar 2006
    Location
    India
    Posts
    312
    Rep Power
    11
    nice yaar.
    I have told u already it has both characterstics. don't make it a big issue.


    user defined because returning type and argument and its defination will be given by us,


    inbuilt because its prototype given by os. os calls it directly.

    plz don't extend argument on it.

    no body will be convinced.
    Nachithe entha riskaina chesta
    okkasari fix ayithe naa maata nene vinanu

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1